Apply screenScaleFactor to implicitWidth (and cleanup)

This commit is contained in:
Ghostkeeper 2019-10-04 11:46:59 +02:00
parent e5c59b1308
commit 618cbffaa7
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276
3 changed files with 5 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import QtQuick.Layouts 1.3
import UM 1.2 as UM
// The labelBar shows a set of labels that are evenly spaced from oneother.
// The labelBar shows a set of labels that are evenly spaced from one another.
// The first item is aligned to the left, the last is aligned to the right.
// It's intended to be used together with RadioCheckBar. As such, it needs
// to know what the used itemSize is, so it can ensure the labels are aligned correctly.

View File

@ -1,4 +1,4 @@
// Copyright (c) 2018 Ultimaker B.V.
// Copyright (c) 2019 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
@ -9,6 +9,7 @@ import QtQuick.Controls.Styles 1.4
import UM 1.2 as UM
import Cura 1.6 as Cura
import ".."
Item
{
id: qualityRow

View File

@ -19,7 +19,7 @@ Item
property int barSize: UM.Theme.getSize("slider_groove_radius").height
property var isCheckedFunction // Function that accepts the modelItem and returns if the item should be active.
implicitWidth: 200
implicitWidth: 200 * screenScaleFactor
implicitHeight: checkboxSize
property var dataModel: null
@ -62,7 +62,7 @@ Item
Layout.fillHeight: true
// The last item of the repeater needs to be shorter, as we don't need another part to fit
// the horizontal bar. The others should essentially not be limited.
Layout.maximumWidth: index + 1 === repeater.count ? activeComponent.width: 200000000
Layout.maximumWidth: index + 1 === repeater.count ? activeComponent.width : 200000000
property bool isEnabled: model.available
// The horizontal bar between the checkable options.