Commit 9d63bc6b authored by Han Young's avatar Han Young
Browse files

fix binary calculator expression panel hide while there is no input

parent 3f6991e1
...@@ -130,15 +130,24 @@ Kirigami.Page { ...@@ -130,15 +130,24 @@ Kirigami.Page {
height: Kirigami.Units.gridUnit * 2 height: Kirigami.Units.gridUnit * 2
width: Math.min(parent.width, contentWidth) width: Math.min(parent.width, contentWidth)
contentHeight: resultBin.height contentHeight: resultBin.height
contentWidth: resultBin.width contentWidth: resultBin.width + Kirigami.Units.gridUnit
flickableDirection: Flickable.HorizontalFlick flickableDirection: Flickable.HorizontalFlick
Controls.Label { Controls.Label {
id: resultBin id: resultBin
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
font.pointSize: Kirigami.Units.gridUnit * 1.5 font.pointSize: Kirigami.Units.gridUnit * 1.5
font.weight: Font.Light font.weight: Font.Light
text: "BIN: " + inputManager.binaryResult text: inputManager.binaryResult
onTextChanged: resultFadeInAnimation.start() onTextChanged: resultFadeInAnimation.start()
Controls.Label {
visible: parent.text.length
anchors.left: parent.right
anchors.bottom: parent.bottom
text: i18n("B")
font.pointSize: Kirigami.Units.gridUnit
font.weight: Font.Light
color: Kirigami.Theme.disabledTextColor
}
} }
} }
...@@ -147,15 +156,24 @@ Kirigami.Page { ...@@ -147,15 +156,24 @@ Kirigami.Page {
height: Kirigami.Units.gridUnit * 2 height: Kirigami.Units.gridUnit * 2
width: Math.min(parent.width, contentWidth) width: Math.min(parent.width, contentWidth)
contentHeight: resultDec.height contentHeight: resultDec.height
contentWidth: resultDec.width contentWidth: resultDec.width + Kirigami.Units.gridUnit
flickableDirection: Flickable.HorizontalFlick flickableDirection: Flickable.HorizontalFlick
Controls.Label { Controls.Label {
id: resultDec id: resultDec
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
font.pointSize: Kirigami.Units.gridUnit * 1.5 font.pointSize: Kirigami.Units.gridUnit * 1.5
font.weight: Font.Light font.weight: Font.Light
text: "DEC: " + inputManager.result text: inputManager.result
onTextChanged: resultFadeInAnimation.start() onTextChanged: resultFadeInAnimation.start()
Controls.Label {
visible: parent.text.length
anchors.left: parent.right
anchors.bottom: parent.bottom
text: i18n("D")
font.pointSize: Kirigami.Units.gridUnit
font.weight: Font.Light
color: Kirigami.Theme.disabledTextColor
}
} }
} }
...@@ -164,15 +182,24 @@ Kirigami.Page { ...@@ -164,15 +182,24 @@ Kirigami.Page {
height: Kirigami.Units.gridUnit * 2 height: Kirigami.Units.gridUnit * 2
width: Math.min(parent.width, contentWidth) width: Math.min(parent.width, contentWidth)
contentHeight: resultHex.height contentHeight: resultHex.height
contentWidth: resultHex.width contentWidth: resultHex.width + Kirigami.Units.gridUnit
flickableDirection: Flickable.HorizontalFlick flickableDirection: Flickable.HorizontalFlick
Controls.Label { Controls.Label {
id: resultHex id: resultHex
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
font.pointSize: Kirigami.Units.gridUnit * 1.5 font.pointSize: Kirigami.Units.gridUnit * 1.5
font.weight: Font.Light font.weight: Font.Light
text: "HEX: " + inputManager.hexResult text: inputManager.hexResult
onTextChanged: resultFadeInAnimation.start() onTextChanged: resultFadeInAnimation.start()
Controls.Label {
visible: parent.text.length
anchors.left: parent.right
anchors.bottom: parent.bottom
text: i18n("H")
font.pointSize: Kirigami.Units.gridUnit
font.weight: Font.Light
color: Kirigami.Theme.disabledTextColor
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment