remove the hack of fontmetrictext

This commit is contained in:
Marco Martin 2011-11-09 17:09:20 +01:00
parent a4cc8972bb
commit d457e071c0
3 changed files with 6 additions and 42 deletions

View File

@ -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

View File

@ -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

View File

@ -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