From 1444ba2c3555268286020b3ce9ff9edb889dd5e0 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 3 Dec 2021 12:24:31 +0300 Subject: [PATCH] Use attached Layout attached properties to set tool button size --- app/gui/NavigableToolButton.qml | 4 ++-- app/gui/main.qml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/gui/NavigableToolButton.qml b/app/gui/NavigableToolButton.qml index 5fee6f5d..bbf6d248 100644 --- a/app/gui/NavigableToolButton.qml +++ b/app/gui/NavigableToolButton.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.3 ToolButton { property string iconSource @@ -20,8 +21,7 @@ ToolButton { // This determines the size of the Material highlight. We increase it // from the default because we use larger than normal icons for TV readability. - background.width: (parent.height - parent.anchors.bottomMargin - parent.anchors.topMargin) * 0.60 - background.height: (parent.height - parent.anchors.bottomMargin - parent.anchors.topMargin) * 0.60 + Layout.preferredHeight: parent.height Keys.onReturnPressed: { clicked() diff --git a/app/gui/main.qml b/app/gui/main.qml index e9483717..a0a380ad 100644 --- a/app/gui/main.qml +++ b/app/gui/main.qml @@ -215,7 +215,7 @@ ApplicationWindow { } RowLayout { - spacing: 20 + spacing: 10 anchors.leftMargin: 10 anchors.rightMargin: 10 anchors.fill: parent