mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Customise scrollbar for extruder selectors
Contributes to issue CURA-8686.
This commit is contained in:
parent
08b8dcfa43
commit
4f82137035
4 changed files with 19 additions and 19 deletions
|
@ -1,9 +1,9 @@
|
|||
// Copyright (c) 2020 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls 2.3 as Controls2
|
||||
import QtQuick.Controls 1.4 as OldControls
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -73,7 +73,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Controls2.ComboBox
|
||||
ComboBox
|
||||
{
|
||||
id: supportExtruderCombobox
|
||||
|
||||
|
@ -229,7 +229,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
popup: Controls2.Popup
|
||||
popup: Popup
|
||||
{
|
||||
y: supportExtruderCombobox.height - UM.Theme.getSize("default_lining").height
|
||||
width: supportExtruderCombobox.width
|
||||
|
@ -238,12 +238,12 @@ Item
|
|||
|
||||
contentItem: ListView
|
||||
{
|
||||
clip: true
|
||||
implicitHeight: contentHeight
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar {}
|
||||
clip: true
|
||||
model: supportExtruderCombobox.popup.visible ? supportExtruderCombobox.delegateModel : null
|
||||
currentIndex: supportExtruderCombobox.highlightedIndex
|
||||
|
||||
Controls2.ScrollIndicator.vertical: Controls2.ScrollIndicator { }
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
|
@ -253,7 +253,7 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
delegate: Controls2.ItemDelegate
|
||||
delegate: ItemDelegate
|
||||
{
|
||||
width: supportExtruderCombobox.width - 2 * UM.Theme.getSize("default_lining").width
|
||||
height: supportExtruderCombobox.height
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2016 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
|
@ -178,12 +178,12 @@ SettingItem
|
|||
|
||||
contentItem: ListView
|
||||
{
|
||||
clip: true
|
||||
implicitHeight: contentHeight
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar {}
|
||||
clip: true
|
||||
model: control.popup.visible ? control.delegateModel : null
|
||||
currentIndex: control.highlightedIndex
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator { }
|
||||
}
|
||||
|
||||
background: Rectangle
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
|
@ -181,12 +181,12 @@ SettingItem
|
|||
|
||||
contentItem: ListView
|
||||
{
|
||||
clip: true
|
||||
implicitHeight: contentHeight
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar {}
|
||||
clip: true
|
||||
model: control.popup.visible ? control.delegateModel : null
|
||||
currentIndex: control.highlightedIndex
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator { }
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue