From 0ddd579db2561e52f7b5289ec986291fb7b567dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikko=20Syrj=C3=A4?= Date: Thu, 23 May 2019 22:48:57 +0300 Subject: Changed toolbar Label items to Text items, scaling works better. --- BarTool.qml | 4 ++++ main.qml | 31 ++++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/BarTool.qml b/BarTool.qml index a6ce03e..07f4e3b 100644 --- a/BarTool.qml +++ b/BarTool.qml @@ -23,6 +23,7 @@ ToolButton onHoveredChanged: { +/* if ( popup !== null ) popup.hide() if ( hovered ) @@ -30,12 +31,15 @@ ToolButton popup = TooltipCreator.create(tooltip, this) popup.show() } +*/ } onPressedChanged: { +/* if ( popup !== null ) popup.hide() +*/ } onClicked: diff --git a/main.qml b/main.qml index f554c75..a4b0071 100644 --- a/main.qml +++ b/main.qml @@ -173,13 +173,14 @@ ApplicationWindow } RowLayout { - height: 32 - Label { text: qsTrId("id_toolbar_application_settings") } + height: snaplist.height * 1.2 + Text { text: qsTrId("id_toolbar_application_settings") } BarSeparator { } - Label { text: qsTrId("id_toolbar_snap_grid") } + Text { text: qsTrId("id_toolbar_snap_grid") } ComboBox { id: snaplist +// width: 60 implicitWidth: 60 model: [ 1, 2, 5, 10 ] onCurrentIndexChanged: @@ -198,7 +199,7 @@ ApplicationWindow } } BarSeparator { } - Label { text: qsTrId("id_toolbar_line_width") } + Text { text: qsTrId("id_toolbar_line_width") } ComboBox { id: widthlist @@ -208,7 +209,7 @@ ApplicationWindow function setWidth() { currentIndex = linewidth - 1 } } BarSeparator { } - Label { text: qsTrId("id_toolbar_text_size") } + Text { text: qsTrId("id_toolbar_text_size") } ComboBox { id: sizelist @@ -218,7 +219,7 @@ ApplicationWindow function setSize() { currentIndex = textsize - 1 } } BarSeparator { } - Label { text: qsTrId("id_toolbar_language") } + Text { text: qsTrId("id_toolbar_language") } ComboBox { id: langlist @@ -230,10 +231,10 @@ ApplicationWindow } RowLayout { - height: 32 - Label { text: qsTrId("id_toolbar_symbol_settings") } + height: colorlist.height * 1.2 + Text { text: qsTrId("id_toolbar_symbol_settings") } BarSeparator { } - Label { text: qsTrId("id_toolbar_color_index") } + Text { text: qsTrId("id_toolbar_color_index") } ComboBox { id: colorlist @@ -247,7 +248,7 @@ ApplicationWindow } BarSeparator { } Item { Layout.fillWidth: true } - Label { text: qsTrId("id_toolbar_fill_item") } + Text { text: qsTrId("id_toolbar_fill_item") } ComboBox { id: filllist @@ -262,7 +263,7 @@ ApplicationWindow function setFill() { currentIndex = fillitem } } BarSeparator { } - Label { text: qsTrId("id_toolbar_alignment") } + Text { text: qsTrId("id_toolbar_alignment") } ComboBox { id: alignlist @@ -286,7 +287,7 @@ ApplicationWindow function setAlign() { currentIndex = alignment - 1 } } BarSeparator { } - Label { text: qsTrId("id_toolbar_text_field") } + Text { text: qsTrId("id_toolbar_text_field") } TextField { id: textfield @@ -303,10 +304,10 @@ ApplicationWindow RowLayout { anchors.fill: parent - Label { Layout.minimumWidth: 40; text: " X: " + mousex } - Label { Layout.minimumWidth: 40; text: " Y: " + mousey } + Text { Layout.minimumWidth: 40; text: " X: " + mousex } + Text { Layout.minimumWidth: 40; text: " Y: " + mousey } Item { Layout.fillWidth: true } - Label { Layout.minimumWidth: 40; text: symbol } + Text { Layout.minimumWidth: 40; text: symbol } } } -- cgit v1.2.3