Skip to content

Commit

Permalink
Merge pull request #41 from ricglz0201/landscape_btn_change
Browse files Browse the repository at this point in the history
Change BASE button styling and position
  • Loading branch information
JALVITO authored May 26, 2020
2 parents b82b546 + b1f7651 commit 3cb123a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions BaseCalc/Views/Keypad.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct KeypadSection: View {
GeometryReader { geometry in
createKeypad(
buttons: self.buttons,
width: getDimension(dim: geometry.size.width, elem: self.buttons[0].count, pad: self.btnPadding),
width: getDimension(dim: geometry.size.width, elem: self.buttons[1].count, pad: self.btnPadding),
height: getDimension(dim: geometry.size.height, elem: self.buttons.count, pad: self.btnPadding),
pad: self.btnPadding
)
Expand All @@ -76,12 +76,12 @@ struct LandscapeKeypad: View {
var body: some View {
KeypadSection(
buttons: [
["AND", "NOR", "D", "E", "F", "AC"],
["OR", "XOR", "A", "B", "C", "±"],
[">>", "X>>Y", "7", "8", "9", "+"],
["<<", "X<<Y", "4", "5", "6", ""],
["FP", "ß", "1", "2", "3", "×"],
["BASE", "=", "0", ".", "÷"],
["BASE", "D", "E", "F", "AC"],
["AND", "NOR", "A", "B", "C", "±"],
["OR", "XOR", "7", "8", "9", "+"],
[">>", "X>>Y", "4", "5", "6", ""],
["<<", "X<<Y", "1", "2", "3", "×"],
["FP", "ß", "=", "0", ".", "÷"],
]
)
}
Expand Down
2 changes: 1 addition & 1 deletion BaseCalc/Views/KeypadButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct KeypadButton: View {
)
})) {
Text(label + " \(calculatorState.currentBase.rawValue)")
.modifier(DarkGrayButton(width: width * 2 + 6, height: height, altCondition: false))
.modifier(OrangeButton(width: width * 2 + 6, height: height, altCondition: false))
})
default:
return makeDigitButton(label: label)
Expand Down

0 comments on commit 3cb123a

Please sign in to comment.