mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 15:26:09 +00:00
Use attached Layout attached properties to set tool button size
This commit is contained in:
parent
fac4c85133
commit
1444ba2c35
@ -1,5 +1,6 @@
|
|||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
ToolButton {
|
ToolButton {
|
||||||
property string iconSource
|
property string iconSource
|
||||||
@ -20,8 +21,7 @@ ToolButton {
|
|||||||
|
|
||||||
// This determines the size of the Material highlight. We increase it
|
// This determines the size of the Material highlight. We increase it
|
||||||
// from the default because we use larger than normal icons for TV readability.
|
// 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
|
Layout.preferredHeight: parent.height
|
||||||
background.height: (parent.height - parent.anchors.bottomMargin - parent.anchors.topMargin) * 0.60
|
|
||||||
|
|
||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
clicked()
|
clicked()
|
||||||
|
@ -215,7 +215,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 20
|
spacing: 10
|
||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user