Skip to content

Commit

Permalink
Update shared components
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Aug 13, 2024
1 parent 6794774 commit 1b2d97e
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 289 deletions.
4 changes: 2 additions & 2 deletions qml/ComponentLibrary/ComponentLibrary.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
<file alias="TumblerThemed.qml">controls/TumblerThemed.qml</file>

<file alias="DatePicker.qml">complex/DatePicker.qml</file>
<file alias="TextField_FileDialog.qml">complex/TextField_FileDialog.qml</file>
<file alias="TextField_FolderDialog.qml">complex/TextField_FolderDialog.qml</file>
<file alias="FileInputArea.qml">complex/FileInputArea.qml</file>
<file alias="FolderInputArea.qml">complex/FolderInputArea.qml</file>

<file alias="MapButton.qml">maps/MapButton.qml</file>
<file alias="MapButtonCompass.qml">maps/MapButtonCompass.qml</file>
Expand Down
File renamed without changes.
File renamed without changes.
139 changes: 0 additions & 139 deletions qml/ComponentLibrary/complex/TextField_FileDialog.qml

This file was deleted.

134 changes: 0 additions & 134 deletions qml/ComponentLibrary/complex/TextField_FolderDialog.qml

This file was deleted.

18 changes: 15 additions & 3 deletions qml/ComponentLibrary/controls/ScrollBarThemed.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ T.ScrollBar {
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)

leftPadding: 0
rightPadding: 0

visible: (policy !== T.ScrollBar.AlwaysOff)
minimumSize: (orientation === Qt.Horizontal) ? height / width : width / height

minimumSize: (orientation === Qt.Horizontal) ? (height / width) : (width / height)

property int radius: isDesktop ? 0 : 8

property color colorBackground: Theme.colorBackground
property color colorMoving: Theme.colorSecondary
property color colorPressed: Theme.colorPrimary

////////////////

Expand Down Expand Up @@ -45,7 +55,8 @@ T.ScrollBar {
y: control.topPadding
height: control.height - control.topPadding - control.bottomPadding

color: Theme.colorBackground
radius: control.radius
color: control.colorBackground
opacity: 0.0
}

Expand All @@ -55,7 +66,8 @@ T.ScrollBar {
implicitWidth: control.interactive ? 12 : 6
implicitHeight: control.interactive ? 12 : 6

color: control.pressed ? Theme.colorSecondary : Theme.colorForeground
radius: control.radius
color: control.pressed ? control.colorPressed : control.colorMoving
opacity: 0.0
}

Expand Down
2 changes: 1 addition & 1 deletion qml/ComponentLibrary/deprecated/ButtonText.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ T.Button {
radius: 2
opacity: {
if (!control.enabled) return 0.4
if (control.hovered && !control.highlighted) return 0.3
if (control.hovered && !control.highlighted) return 0.66
return 1
}
color: {
Expand Down
9 changes: 4 additions & 5 deletions qml/ComponentLibrary/generic/SelectorGrid.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ Item {
id: selectorGrid

implicitWidth: 512
implicitHeight: 40
implicitHeight: Theme.componentHeight

width: parent.width
height: (selectorGrid.btnRows * btnHeight) + (selectorGrid.btnRows * contentPositioner.spacing)
height: (selectorGrid.btnRows * btnHeight) + ((selectorGrid.btnRows-1) * contentPositioner.spacing)

opacity: enabled ? 1 : 0.66

property int btnCols: 4
property int btnRows: 3
property int btnWidth: width / selectorGrid.btnCols
property int btnHeight: 40
property int btnWidth: ((width - ((selectorGrid.btnCols-1) * contentPositioner.spacing)) / selectorGrid.btnCols)
property int btnHeight: Theme.componentHeight

signal menuSelected(var index)
property int currentSelection: 0
Expand All @@ -36,7 +36,6 @@ Item {
Grid {
id: contentPositioner
anchors.fill: parent
anchors.margins: 0
spacing: 1

columns: selectorGrid.btnCols
Expand Down
11 changes: 11 additions & 0 deletions qml/ComponentLibrary/menus/DesktopHeaderItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ T.Button {
// colors
property color colorContent: Theme.colorHeaderContent
property color colorHighlight: Theme.colorHeaderHighlight
property color colorRipple: Qt.rgba(colorContent.r, colorContent.g, colorContent.b, 0.08)

////////////////////////////////////////////////////////////////////////////

Expand All @@ -46,6 +47,16 @@ T.Button {
}
Behavior on opacity { OpacityAnimator { duration: 233 } }

RippleThemed {
anchors.fill: parent
anchor: control
clip: true

pressed: control.pressed
active: control.enabled && control.down
color: control.colorRipple
}

Rectangle { // backgroundIndicator
anchors.top: parent.top
anchors.left: parent.left
Expand Down
Loading

0 comments on commit 1b2d97e

Please sign in to comment.