use the font size for control size
This commit is contained in:
parent
94ad9f8d3f
commit
3da7704b3a
@ -25,8 +25,14 @@ DualStateButton {
|
||||
view: PlasmaCore.FrameSvgItem {
|
||||
imagePath: "widgets/button"
|
||||
prefix: "normal"
|
||||
width: 16
|
||||
height: 16
|
||||
width: fontMetricText.height + margins.left
|
||||
height: fontMetricText.height + margins.top
|
||||
//FIXME: an hack to have font metrics: can we have a proper binding?
|
||||
Text {
|
||||
id: fontMetricText
|
||||
text: "M"
|
||||
visible: false
|
||||
}
|
||||
PlasmaCore.SvgItem {
|
||||
svg: PlasmaCore.Svg {
|
||||
id: checkmarkSvg
|
||||
@ -34,7 +40,10 @@ DualStateButton {
|
||||
}
|
||||
elementId: "checkbox"
|
||||
opacity: checked ? 1 : 0
|
||||
anchors.fill: parent
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: parent.margins.left/2
|
||||
}
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 250
|
||||
|
@ -86,8 +86,8 @@ Item {
|
||||
bottom: parent.bottom
|
||||
left: surfaceLoader.right
|
||||
right: parent.right
|
||||
// XXX: see how this margin will be set
|
||||
leftMargin: hover.margins.right
|
||||
//FIXME: see how this margin will be set
|
||||
leftMargin: height/4
|
||||
}
|
||||
color: theme.textColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
@ -27,8 +27,14 @@ DualStateButton {
|
||||
view: PlasmaCore.FrameSvgItem {
|
||||
imagePath: "widgets/button"
|
||||
prefix: "normal"
|
||||
width: 16
|
||||
height: 16
|
||||
width: fontMetricText.height + margins.left
|
||||
height: fontMetricText.height + margins.top
|
||||
//FIXME: an hack to have font metrics: can we have a proper binding?
|
||||
Text {
|
||||
id: fontMetricText
|
||||
text: "M"
|
||||
visible: false
|
||||
}
|
||||
PlasmaCore.SvgItem {
|
||||
svg: PlasmaCore.Svg {
|
||||
id: checkmarkSvg
|
||||
@ -36,7 +42,10 @@ DualStateButton {
|
||||
}
|
||||
elementId: "radiobutton"
|
||||
opacity: checked ? 1 : 0
|
||||
anchors.fill: parent
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: parent.margins.left/2
|
||||
}
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 250
|
||||
|
@ -26,10 +26,14 @@ DualStateButton {
|
||||
view: PlasmaCore.FrameSvgItem {
|
||||
imagePath: "widgets/frame"
|
||||
prefix: "sunken"
|
||||
width: 32
|
||||
height: 16
|
||||
//not used in this control
|
||||
property bool shadowVisible
|
||||
width: height * 2
|
||||
height: fontMetricText.height + margins.top
|
||||
//FIXME: an hack to have font metrics: can we have a proper binding?
|
||||
Text {
|
||||
id: fontMetricText
|
||||
text: "M"
|
||||
visible: false
|
||||
}
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
imagePath: "widgets/button"
|
||||
|
Loading…
x
Reference in New Issue
Block a user