Skip to content

Commit

Permalink
UI work
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Apr 22, 2024
1 parent d5c63bf commit d957eba
Show file tree
Hide file tree
Showing 101 changed files with 317 additions and 8,312 deletions.
22 changes: 16 additions & 6 deletions qml/Application.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Window
import Qt5Compat.GraphicalEffects

import ThemeEngine

Expand Down Expand Up @@ -104,7 +103,7 @@ ApplicationWindow {
onActivated: backAction()
}
Shortcut {
sequence: StandardKey.Forward
sequences: [StandardKey.Forward]
onActivated: forwardAction()
}/*
Shortcut {
Expand Down Expand Up @@ -275,7 +274,7 @@ ApplicationWindow {
}
]
}

/*
layer.enabled: (settingsManager.appThemeCSD && Qt.platform.os !== "windows")
layer.effect: OpacityMask {
maskSource: Rectangle {
Expand Down Expand Up @@ -313,6 +312,7 @@ ApplicationWindow {
}
}
}
*/
}
}

Expand Down Expand Up @@ -363,14 +363,24 @@ ApplicationWindow {

// Exit ////////////////////////////////////////////////////////////////////

Loader {
id: popupExit_loader

active: false
asynchronous: false
sourceComponent: PopupExit {
id: popupExit
parent: appWindow.contentItem
}
}

onClosing: {
// If a job is running, ask user to confirm exit
if (jobManager.workingJobCount > 0) {
close.accepted = false

var popupComponent = Qt.createComponent("qrc:/qml/popupExit.qml")
var popupExit = popupComponent.createObject(appWindow, { "parent": appWindow })
popupExit.open()
popupExit_loader.active = true
popupExit_loader.item.open()
}
}
}
28 changes: 13 additions & 15 deletions qml/ComponentLibrary/controls/ProgressBarThemed.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ T.ProgressBar {
implicitWidth: 200
implicitHeight: 12
y: (control.height - height) / 2

radius: (Theme.componentRadius / 2)
color: control.colorBackground
}

Expand All @@ -35,20 +33,20 @@ T.ProgressBar {
height: control.height
color: control.colorForeground
}
}

layer.enabled: true
layer.effect: MultiEffect {
maskEnabled: true
maskInverted: false
maskThresholdMin: 0.5
maskSpreadAtMin: 1.0
maskSpreadAtMax: 0.0
maskSource: ShaderEffectSource {
sourceItem: Rectangle {
width: control.width
height: control.height
radius: Theme.componentRadius
}
layer.enabled: true
layer.effect: MultiEffect {
maskEnabled: true
maskInverted: false
maskThresholdMin: 0.5
maskSpreadAtMin: 1.0
maskSpreadAtMax: 0.0
maskSource: ShaderEffectSource {
sourceItem: Rectangle {
width: control.width
height: control.height
radius: Theme.componentRadius
}
}
}
Expand Down
21 changes: 6 additions & 15 deletions qml/ScreenSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ Loader {
ComboBoxThemed {
id: comboBoxAppTheme
width: 256
height: 36
anchors.verticalCenter: parent.verticalCenter

model: ListModel {
Expand Down Expand Up @@ -373,8 +372,7 @@ Loader {
height: 40
spacing: 32

CheckBoxThemed {
id: checkIgnoreJunk
CheckBoxThemed { // checkIgnoreJunk
width: 350
anchors.verticalCenter: parent.verticalCenter

Expand All @@ -384,8 +382,7 @@ Loader {
onClicked: settingsManager.ignoreJunk = checked
}

CheckBoxThemed {
id: checkIgnoreAudio
CheckBoxThemed { // checkIgnoreAudio
width: 350
anchors.verticalCenter: parent.verticalCenter

Expand All @@ -400,8 +397,7 @@ Loader {
height: 40
spacing: 32

CheckBoxThemed {
id: checkAutoDelete
CheckBoxThemed { // checkAutoDelete
width: 350
anchors.verticalCenter: parent.verticalCenter

Expand All @@ -411,8 +407,7 @@ Loader {
onClicked: settingsManager.autoDelete = checked
}

CheckBoxThemed {
id: checkAutoMerge
CheckBoxThemed { // checkAutoMerge
width: 350
anchors.verticalCenter: parent.verticalCenter

Expand All @@ -422,8 +417,7 @@ Loader {
onClicked: settingsManager.autoMerge = checked
}

CheckBoxThemed {
id: checkAutoTelemetry
CheckBoxThemed { // checkAutoTelemetry
width: 350
anchors.verticalCenter: parent.verticalCenter

Expand All @@ -438,8 +432,7 @@ Loader {
height: 40
spacing: 32

CheckBoxThemed {
id: checkMoveToTrash
CheckBoxThemed { // checkMoveToTrash
width: 450
anchors.verticalCenter: parent.verticalCenter

Expand Down Expand Up @@ -553,7 +546,6 @@ Loader {
ComboBoxThemed {
id: comboBoxContentHierarchy
width: 256
height: 36
anchors.verticalCenter: parent.verticalCenter
model: ListModel {
Expand Down Expand Up @@ -610,7 +602,6 @@ Loader {
}

ButtonSolid {
height: 36
anchors.horizontalCenter: parent.horizontalCenter

text: qsTr("Add a new one")
Expand Down
47 changes: 32 additions & 15 deletions qml/components/ComboBoxFolder.qml
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.impl
import QtQuick.Templates as T

import ThemeEngine 1.0
import ThemeEngine

ComboBox {
T.ComboBox {
id: control
implicitWidth: 200
implicitHeight: Theme.componentHeight

font.pixelSize: Theme.componentFontSize
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)

leftPadding: 16
rightPadding: 16

property string folders: ""

////////

background: Rectangle {
implicitWidth: 200
implicitHeight: Theme.componentHeight

radius: Theme.componentRadius
opacity: control.enabled ? 1 : 0.66
color: control.down ? Theme.colorComponentDown : Theme.colorComponent
border.width: Theme.componentBorderWidth
border.width: 2
border.color: Theme.colorComponentBorder
}

////////

contentItem: Text {
leftPadding: 12
rightPadding: 8
clip: true
//leftPadding: 12
//rightPadding: 8
//clip: true

text: control.displayText
textFormat: Text.PlainText

font: control.font
color: Theme.colorComponentContent
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter

opacity: control.enabled ? 1 : 0.66
color: Theme.colorComponentContent

Text {
x: parent.leftPadding + parent.contentWidth
anchors.verticalCenter: parent.verticalCenter
Expand Down Expand Up @@ -77,7 +91,7 @@ ComboBox {

////////

delegate: ItemDelegate {
delegate: T.ItemDelegate {
width: control.width - 2
height: control.height
highlighted: (control.highlightedIndex === index)
Expand All @@ -92,7 +106,10 @@ ComboBox {
}

contentItem: Text {
text: modelData
leftPadding: control.leftPadding
text: control.textRole
? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole])
: modelData
color: highlighted ? "black" : Theme.colorSubText
font.pixelSize: Theme.componentFontSize
elide: Text.ElideRight
Expand All @@ -105,7 +122,7 @@ ComboBox {
popup: Popup {
y: control.height - 1
width: control.width
implicitHeight: contentItem.implicitHeight + 2
implicitHeight: (contentItem.implicitHeight) ? contentItem.implicitHeight + 2 : 0
padding: 1

contentItem: ListView {
Expand Down
20 changes: 15 additions & 5 deletions qml/components/ItemMediaDirectory.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "qrc:/js/UtilsPath.js" as UtilsPath

Item {
id: itemMediaDirectory

implicitWidth: 800
implicitHeight: 48

Expand All @@ -17,7 +18,7 @@ Item {

FolderInputArea {
id: textField_path
width: (itemMediaDirectory.width < 720) ? 640 : 720
width: (itemMediaDirectory.width / 2)
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter

Expand Down Expand Up @@ -151,7 +152,6 @@ Item {
ProgressBarThemed {
id: progressBar
width: parent.width
height: 8

value: directory.storageLevel
}
Expand Down Expand Up @@ -253,9 +253,19 @@ Item {
sourceSize: 24

onClicked: {
var popupComponent = Qt.createComponent("qrc:/qml/PopupMediaDirectory.qml")
var popupMediaDirectory = popupComponent.createObject(appWindow, { "parent": appWindow });
popupMediaDirectory.open()
popupMediaDirectory_loader.active = true
popupMediaDirectory_loader.item.open()
}

Loader {
id: popupMediaDirectory_loader

active: false
asynchronous: false
sourceComponent: PopupMediaDirectory {
id: popupMediaDirectory
parent: appWindow.contentItem
}
}
}

Expand Down
Loading

0 comments on commit d957eba

Please sign in to comment.