on xenial help sign in
elide the window title in the title bar
1182922Lukáš Tinkl
qml/Stages/DecoratedWindow.qml+1
@@ -67,6 +67,7 @@ FocusScope {
67 objectName: application ? "appWindowDecoration_" + application.appId : "appWindowDecoration_null"
67 objectName: application ? "appWindowDecoration_" + application.appId : "appWindowDecoration_null"
68 anchors { left: parent.left; top: parent.top; right: parent.right }
68 anchors { left: parent.left; top: parent.top; right: parent.right }
69 height: units.gu(3)
69 height: units.gu(3)
70+ width: root.width
70 title: window.title !== "" ? window.title : model.name
71 title: window.title !== "" ? window.title : model.name
71 onClose: root.close();
72 onClose: root.close();
72 onMaximize: root.maximize();
73 onMaximize: root.maximize();
qml/Stages/WindowDecoration.qml+4−1
@@ -71,11 +71,12 @@ MouseArea {
71 }
71 }
72
72
73 Row {
73 Row {
74− anchors { left: parent.left; top: parent.top; bottom: parent.bottom; margins: units.gu(0.7) }
74+ anchors { fill: parent; margins: units.gu(0.7) }
75 spacing: units.gu(1)
75 spacing: units.gu(1)
76 opacity: root.active ? 1 : 0.5
76 opacity: root.active ? 1 : 0.5
77
77
78 WindowControlButtons {
78 WindowControlButtons {
79+ id: buttons
79 height: parent.height
80 height: parent.height
80 onClose: root.close();
81 onClose: root.close();
81 onMinimize: root.minimize();
82 onMinimize: root.minimize();
@@ -87,9 +88,11 @@ MouseArea {
87 objectName: "windowDecorationTitle"
88 objectName: "windowDecorationTitle"
88 color: "#DFDBD2"
89 color: "#DFDBD2"
89 height: parent.height
90 height: parent.height
91+ width: parent.width - buttons.width - parent.anchors.rightMargin - parent.anchors.leftMargin
90 verticalAlignment: Text.AlignVCenter
92 verticalAlignment: Text.AlignVCenter
91 fontSize: "small"
93 fontSize: "small"
92 font.bold: true
94 font.bold: true
95+ elide: Text.ElideRight
93 }
96 }
94 }
97 }
95}
98}