remove the hack of fontmetrictext
This commit is contained in:
parent
a4cc8972bb
commit
d457e071c0
@ -25,24 +25,9 @@ DualStateButton {
|
||||
view: PlasmaCore.FrameSvgItem {
|
||||
imagePath: "widgets/button"
|
||||
prefix: "normal"
|
||||
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
|
||||
font.capitalization: theme.defaultFont.capitalization
|
||||
font.family: theme.defaultFont.family
|
||||
font.italic: theme.defaultFont.italic
|
||||
font.letterSpacing: theme.defaultFont.letterSpacing
|
||||
font.pointSize: theme.defaultFont.pointSize
|
||||
font.strikeout: theme.defaultFont.strikeout
|
||||
font.underline: theme.defaultFont.underline
|
||||
font.weight: theme.defaultFont.weight
|
||||
font.wordSpacing: theme.defaultFont.wordSpacing
|
||||
color: theme.textColor
|
||||
}
|
||||
width: theme.defaultFont.mSize.height + margins.left
|
||||
height: theme.defaultFont.mSize.height + margins.top
|
||||
|
||||
PlasmaCore.SvgItem {
|
||||
svg: PlasmaCore.Svg {
|
||||
id: checkmarkSvg
|
||||
|
@ -30,24 +30,9 @@ DualStateButton {
|
||||
imagePath: "widgets/actionbutton"
|
||||
}
|
||||
elementId: "normal"
|
||||
width: fontMetricText.height + 6
|
||||
width: theme.defaultFont.mSize.height + 6
|
||||
height: width
|
||||
//FIXME: an hack to have font metrics: can we have a proper binding?
|
||||
Text {
|
||||
id: fontMetricText
|
||||
text: "M"
|
||||
visible: false
|
||||
font.capitalization: theme.defaultFont.capitalization
|
||||
font.family: theme.defaultFont.family
|
||||
font.italic: theme.defaultFont.italic
|
||||
font.letterSpacing: theme.defaultFont.letterSpacing
|
||||
font.pointSize: theme.defaultFont.pointSize
|
||||
font.strikeout: theme.defaultFont.strikeout
|
||||
font.underline: theme.defaultFont.underline
|
||||
font.weight: theme.defaultFont.weight
|
||||
font.wordSpacing: theme.defaultFont.wordSpacing
|
||||
color: theme.textColor
|
||||
}
|
||||
|
||||
PlasmaCore.SvgItem {
|
||||
svg: PlasmaCore.Svg {
|
||||
id: checkmarkSvg
|
||||
|
@ -27,13 +27,7 @@ DualStateButton {
|
||||
imagePath: "widgets/slider"
|
||||
prefix: "groove"
|
||||
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
|
||||
}
|
||||
height: theme.defaultFont.mSize.height + margins.top
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
id: highlight
|
||||
|
Loading…
x
Reference in New Issue
Block a user