fix(slint): center header tab labels, brighten and shrink them
Tab labels rode high against their glyph and the header because a bare Text box sits high on its descender space. They now use an explicit row-height box with vertical-alignment, drop one point to 11px, and take the brightest text color. cc
This commit is contained in:
1 file changed
+10
-10
@@ -42,16 +42,16 @@ component NavTab inherits Rectangle {
|
||||
tint: root.active ? Theme.text-primary : Theme.text-secondary;
|
||||
}
|
||||
}
|
||||
// Wrapped in a centered VerticalLayout so the label is centered
|
||||
// the same way the glyph and caret are — otherwise it rides high.
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Text {
|
||||
text: root.label;
|
||||
color: root.active ? Theme.text-primary : Theme.text-secondary;
|
||||
font-size: 12px;
|
||||
font-weight: root.active ? Typography.semibold : Typography.regular;
|
||||
}
|
||||
// An explicit row-height box plus vertical-alignment centers the
|
||||
// label optically against the glyph and caret — a bare Text box
|
||||
// rides high because of the font's descender space.
|
||||
Text {
|
||||
text: root.label;
|
||||
height: root.height;
|
||||
vertical-alignment: center;
|
||||
color: Theme.text-primary;
|
||||
font-size: 11px;
|
||||
font-weight: root.active ? Typography.semibold : Typography.regular;
|
||||
}
|
||||
// Caret marking the tab as a dropdown.
|
||||
VerticalLayout {
|
||||
|
||||
Reference in new issue
Block a user