1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- import QtQuick 2.10
- import QtQuick.Controls 1.4 as OldControls
- import QtQuick.Controls 2.3
- import QtQuick.Controls.Styles 1.4
- import UM 1.2 as UM
- OldControls.TableView
- {
- itemDelegate: Item
- {
- height: tableCellLabel.implicitHeight
- Label
- {
- id: tableCellLabel
- color: styleData.selected ? UM.Theme.getColor("primary_button_text") : UM.Theme.getColor("text")
- elide: Text.ElideRight
- text: styleData.value
- anchors.fill: parent
- anchors.leftMargin: 10 * screenScaleFactor
- verticalAlignment: Text.AlignVCenter
- }
- }
- rowDelegate: Rectangle
- {
- color: styleData.selected ? UM.Theme.getColor("primary_button") : UM.Theme.getColor("main_background")
- height: UM.Theme.getSize("table_row").height
- }
-
- style: TableViewStyle
- {
- backgroundColor: UM.Theme.getColor("main_background")
- handle: Rectangle
- {
-
- implicitWidth: UM.Theme.getSize("scrollbar").width
- implicitHeight: UM.Theme.getSize("scrollbar").width
- radius: width / 2
- color: UM.Theme.getColor(styleData.pressed ? "scrollbar_handle_down" : (styleData.hovered ? "scrollbar_handle_hover" : "scrollbar_handle"))
- }
- scrollBarBackground: Rectangle
- {
-
- implicitWidth: UM.Theme.getSize("scrollbar").width
- implicitHeight: UM.Theme.getSize("scrollbar").width
- color: UM.Theme.getColor("main_background")
- }
-
- corner: Rectangle
- {
- color: UM.Theme.getColor("main_background")
- }
-
- incrementControl: Item { }
- decrementControl: Item { }
- }
- }
|