mirror of
https://github.com/overte-org/overte.git
synced 2025-08-16 20:54:50 +02:00
cleanup and fits text to buttons
This commit is contained in:
parent
f51025061c
commit
02612e0465
2 changed files with 3 additions and 7 deletions
|
@ -1,10 +1,5 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import "../../styles-uit"
|
||||
import "../../controls-uit" as HifiControls
|
||||
import "../../controls"
|
||||
import "../toolbars"
|
||||
|
||||
StackView {
|
||||
id: editRoot
|
||||
|
|
|
@ -19,7 +19,6 @@ TabButton {
|
|||
property alias title: control.text
|
||||
property alias active: control.checkable
|
||||
height: 40
|
||||
font.pixelSize: height / 2
|
||||
padding: 0
|
||||
spacing: 0
|
||||
HifiConstants { id: hifi; }
|
||||
|
@ -32,6 +31,7 @@ TabButton {
|
|||
color: "white"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
fontSizeMode: Text.HorizontalFit
|
||||
property string glyphtext: ""
|
||||
HiFiGlyphs {
|
||||
anchors.centerIn: parent
|
||||
|
@ -49,7 +49,8 @@ TabButton {
|
|||
|
||||
background: Rectangle {
|
||||
color: control.checked ? "#404040" :"black"
|
||||
implicitWidth: control.contentItem.width + 42
|
||||
implicitWidth: control.contentItem.width + 42 > text.paintedWidth ? control.contentItem.width + 42 :
|
||||
text.paintedWidth + 10
|
||||
implicitHeight: 40
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue