give typical items the same (font based) height
this way everything will look exactly vertically aligned
This commit is contained in:
parent
c2e980fa11
commit
0c2995f8e8
@ -35,8 +35,8 @@ Item {
|
||||
|
||||
signal clicked()
|
||||
|
||||
width: Math.max(50, icon.width + label.paintedWidth + surfaceNormal.margins.left + surfaceNormal.margins.right) + ((icon.valid) ? surfaceNormal.margins.left : 0);
|
||||
height: Math.max(20, Math.max(icon.height, label.paintedHeight) + surfaceNormal.margins.top + surfaceNormal.margins.bottom)
|
||||
width: Math.max(theme.defaultFont.mSize.width*12, icon.width + label.paintedWidth + surfaceNormal.margins.left + surfaceNormal.margins.right) + ((icon.valid) ? surfaceNormal.margins.left : 0);
|
||||
height: Math.max(theme.defaultFont.mSize.height*1.8, Math.max(icon.height, label.paintedHeight) + surfaceNormal.margins.top + surfaceNormal.margins.bottom)
|
||||
|
||||
// TODO: needs to define if there will be specific graphics for
|
||||
// disabled buttons
|
||||
|
@ -35,7 +35,7 @@ Item {
|
||||
property alias shadow: shadowLoader.sourceComponent
|
||||
|
||||
width: surfaceLoader.width + label.paintedWidth
|
||||
height: surfaceLoader.height
|
||||
height: theme.defaultFont.mSize.height*1.8
|
||||
// TODO: needs to define if there will be specific graphics for
|
||||
// disabled buttons
|
||||
opacity: dualButton.enabled ? 1.0 : 0.5
|
||||
|
@ -23,6 +23,9 @@ import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
Text {
|
||||
id: root
|
||||
|
||||
height: theme.defaultFont.mSize.height*1.8
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
font.capitalization: theme.defaultFont.capitalization
|
||||
font.family: theme.defaultFont.family
|
||||
font.italic: theme.defaultFont.italic
|
||||
|
@ -43,8 +43,8 @@ Item {
|
||||
// Convenience API
|
||||
property bool _isVertical: orientation == Qt.Vertical
|
||||
|
||||
width: _isVertical ? 22 : 200
|
||||
height: _isVertical ? 200 : 22
|
||||
width: _isVertical ? theme.defaultFont.mSize.height*1.8 : 200
|
||||
height: _isVertical ? 200 : theme.defaultFont.mSize.height*1.8
|
||||
// TODO: needs to define if there will be specific graphics for
|
||||
// disabled sliders
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
|
@ -84,8 +84,8 @@ Item {
|
||||
property alias activeFocus: textInput.activeFocus
|
||||
|
||||
// TODO: fix default size
|
||||
implicitWidth: 100
|
||||
implicitHeight: 26
|
||||
implicitWidth: theme.defaultFont.mSize.width*12
|
||||
implicitHeight: theme.defaultFont.mSize.height*1.8
|
||||
// TODO: needs to define if there will be specific graphics for
|
||||
// disabled text fields
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
|
@ -23,7 +23,7 @@ import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
Item{
|
||||
id: toolBar
|
||||
width: parent.width
|
||||
height: 48 + frameSvg.margins.top + frameSvg.margins.bottom
|
||||
height: theme.defaultFont.mSize.height*2 + frameSvg.margins.top + frameSvg.margins.bottom
|
||||
|
||||
// The current set of tools; null if none.
|
||||
property Item tools
|
||||
|
@ -41,8 +41,8 @@ Item {
|
||||
}
|
||||
|
||||
|
||||
implicitWidth: Math.max(50, icon.width + label.paintedWidth + surface.margins.left + surface.margins.right)
|
||||
implicitHeight: Math.max(20, Math.max(icon.height, label.paintedHeight) + surface.margins.top + surface.margins.bottom)
|
||||
implicitWidth: Math.max(theme.defaultFont.mSize.width*12, icon.width + label.paintedWidth + surface.margins.left + surface.margins.right) + ((icon.valid) ? surface.margins.left : 0);
|
||||
implicitHeight: Math.max(theme.defaultFont.mSize.height*1.8, Math.max(icon.height, label.paintedHeight) + surface.margins.top + surface.margins.bottom)
|
||||
|
||||
// TODO: needs to define if there will be specific graphics for
|
||||
// disabled buttons
|
||||
|
@ -26,6 +26,9 @@ PlasmaComponents.Page {
|
||||
|
||||
tools: PlasmaComponents.ToolBarLayout {
|
||||
spacing: 5
|
||||
PlasmaComponents.Label {
|
||||
text: "Text label:"
|
||||
}
|
||||
PlasmaComponents.ToolButton {
|
||||
text: "ToolButton"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user