making the icons in the toolbar work a little better
This commit is contained in:
parent
464ca87529
commit
cc3f87e6f5
1 changed files with 73 additions and 0 deletions
|
@ -37,7 +37,24 @@ Item {
|
||||||
background: Presenter.TextBackground {
|
background: Presenter.TextBackground {
|
||||||
control: fontBox
|
control: fontBox
|
||||||
}
|
}
|
||||||
|
|
||||||
|
indicator: Kirigami.Icon {
|
||||||
|
anchors {right: parent.right
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
rightMargin: 2}
|
||||||
|
source: "arrow-down"
|
||||||
|
rotation: fontBox.down ? 180 : 0
|
||||||
|
color: fontBox.pressed ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor
|
||||||
|
|
||||||
|
Behavior on rotation {
|
||||||
|
NumberAnimation {
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
duration: 300
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.SpinBox {
|
Controls.SpinBox {
|
||||||
id: fontSizeBox
|
id: fontSizeBox
|
||||||
editable: true
|
editable: true
|
||||||
|
@ -60,6 +77,34 @@ Item {
|
||||||
background: Presenter.TextBackground {
|
background: Presenter.TextBackground {
|
||||||
control: hAlignmentBox
|
control: hAlignmentBox
|
||||||
}
|
}
|
||||||
|
|
||||||
|
indicator: Kirigami.Icon {
|
||||||
|
anchors {right: parent.right
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
rightMargin: 2}
|
||||||
|
source: "arrow-down"
|
||||||
|
rotation: hAlignmentBox.down ? 180 : 0
|
||||||
|
color: hAlignmentBox.pressed ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor
|
||||||
|
|
||||||
|
Behavior on rotation {
|
||||||
|
NumberAnimation {
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
duration: 300
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
contentItem: Text {
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: hAlignmentBox.indicator.width + hAlignmentBox.spacing
|
||||||
|
|
||||||
|
text: hAlignmentBox.displayText
|
||||||
|
font: hAlignmentBox.font
|
||||||
|
color: hAlignmentBox.pressed ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor;
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Controls.ComboBox {
|
Controls.ComboBox {
|
||||||
id: vAlignmentBox
|
id: vAlignmentBox
|
||||||
|
@ -71,6 +116,34 @@ Item {
|
||||||
background: Presenter.TextBackground {
|
background: Presenter.TextBackground {
|
||||||
control: vAlignmentBox
|
control: vAlignmentBox
|
||||||
}
|
}
|
||||||
|
|
||||||
|
indicator: Kirigami.Icon {
|
||||||
|
anchors {right: parent.right
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
rightMargin: 2}
|
||||||
|
source: "arrow-down"
|
||||||
|
rotation: vAlignmentBox.down ? 180 : 0
|
||||||
|
color: vAlignmentBox.pressed ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor
|
||||||
|
|
||||||
|
Behavior on rotation {
|
||||||
|
NumberAnimation {
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
duration: 300
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: Text {
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: vAlignmentBox.indicator.width + vAlignmentBox.spacing
|
||||||
|
|
||||||
|
text: vAlignmentBox.displayText
|
||||||
|
font: vAlignmentBox.font
|
||||||
|
color: vAlignmentBox.pressed ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor;
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Controls.ToolButton {
|
Controls.ToolButton {
|
||||||
text: "B"
|
text: "B"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue