Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor QML components #62

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c1f46ce
refactor: Extract Preferences screen
sergeykuzmich Sep 18, 2024
0263b80
GitButler WIP Commit
gitbutler-client Sep 20, 2024
1204da5
feat: Add mask to TrayIcon icon
sergeykuzmich Sep 20, 2024
007c1da
wip: refactor: Refactor application related settings
sergeykuzmich Sep 20, 2024
6d8dec7
wip: feat: Add OSX window control colors. Setup window behavior
sergeykuzmich Sep 21, 2024
e6fb238
feat: Add Credits component to Preferences screen to display version …
sergeykuzmich Sep 21, 2024
ead773d
wip: Sequence component
sergeykuzmich Sep 21, 2024
053a8f6
refactor: Fetch updated app version.
sergeykuzmich Sep 22, 2024
04fb716
build: Update project version to 5.0.0 in CMakeLists.txt.
sergeykuzmich Sep 23, 2024
6c62ed8
fix: Use shared app header
sergeykuzmich Sep 23, 2024
010e48e
chore: Adjust transitionDuration and transitionType in main.qml
sergeykuzmich Sep 23, 2024
41d9530
fix: Save & load sequences to (from) file system
sergeykuzmich Sep 29, 2024
0b36ce9
feat(timer-model): Refactor timer model structure and initialization
sergeykuzmich Sep 29, 2024
1ef19c2
chore: Apply `qmlformat`
sergeykuzmich Oct 19, 2024
cdbffea
feat(timer): Add tooltips for action icons
sergeykuzmich Oct 19, 2024
8c59819
feat: Bring back file drop feature
sergeykuzmich Oct 19, 2024
58b4371
refactor: Adjust size and height of elements on Timer screen
sergeykuzmich Oct 19, 2024
19c4f82
refactor: Setup basic directories tree. Get back all UI components
sergeykuzmich Oct 20, 2024
6a8c826
refactor: Fixing formatting and updating Pilorama desktop version to …
sergeykuzmich Oct 20, 2024
22418fb
Remove TrayIcon.qml
sergeykuzmich Oct 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions presets/Colors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{"id": 0, "name": "Red", "color": "red", "duration": 600},
{"id": 1, "name": "Orange", "color": "orange", "duration": 600},
{"id": 2, "name": "Yellow", "color": "yellow", "duration": 600},
{"id": 3, "name": "Green", "color": "green", "duration": 600},
{"id": 4, "name": "Cyan", "color": "cyan", "duration": 600},
{"id": 5, "name": "Blue", "color": "blue", "duration": 600},
{"id": 6, "name": "Violet", "color": "violet", "duration": 600}
]
11 changes: 1 addition & 10 deletions presets/Pomodoro.json
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
[
{"id":0,"name":"Pomodoro","color":"red","duration":1500},
{"id":1,"name":"Short Break","color":"green","duration":300},
{"id":2,"name":"Pomodoro","color":"red","duration":1500},
{"id":3,"name":"Short Break","color":"green","duration":300},
{"id":4,"name":"Pomodoro","color":"red","duration":1500},
{"id":5,"name":"Short Break","color":"green","duration":300},
{"id":6,"name":"Pomodoro","color":"red","duration":1500},
{"id":7,"name":"Long Break","color":"blue","duration":900}
]
[{"id":0,"name":"Pomodoro","color":"red","duration":1500},{"id":1,"name":"Short Break","color":"green","duration":300},{"id":2,"name":"Pomodoro","color":"red","duration":1500},{"id":3,"name":"Short Break","color":"green","duration":300},{"id":4,"name":"Pomodoro","color":"red","duration":1500},{"id":5,"name":"Short Break","color":"green","duration":300},{"id":6,"name":"Pomodoro","color":"red","duration":1500},{"id":7,"name":"Long Break","color":"blue","duration":900}]
1 change: 1 addition & 0 deletions presets/Tomato.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"id":0,"name":"Pomodoro","color":"red","duration":1500},{"id":1,"name":"Short Break","color":"green","duration":300},{"id":2,"name":"Pomodoro","color":"red","duration":1500},{"id":3,"name":"Long Break","color":"blue","duration":900}]
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(Pilorama VERSION 4.0.4 LANGUAGES CXX)
project(Pilorama VERSION 5.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
61 changes: 0 additions & 61 deletions src/Components/Clock.qml

This file was deleted.

238 changes: 132 additions & 106 deletions src/Components/Colors.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,129 +3,155 @@ import QtQuick
QtObject {
id: colors

property var colorMap: ({
"bg": {
"night": "#282828",
"day": "#F3F3F3",
"trayNight": "#353535",
"trayDay": "#F6F6F6",
"regular": false
},
"dark": {
property var colorsMap: ({
"bg": {
"night": "#282828",
"day": "#F3F3F3",
"trayNight": "#353535",
"trayDay": "#F6F6F6",
"type": "ui"
},
"dark": {
"night": "#fff",
"day": "#3E393A",
"trayNight": "#EFEFEF",
"trayDay": "#3C3C3C",
"regular": false
},
"mid": {
"night": "#959C9B",
"day": "#878183",
"trayNight": "#909090",
"trayDay": "#AEAEAE",
"regular": false
},
"light": {
"night": "#616665",
"day": "#BAB4B4",
"trayNight": "#474747",
"trayDay": "#DCDCDC",
"regular": false
},
"lighter": {
"night": "#454747",
"day": "#E0DDDD",
"trayNight": "#474747",
"trayDay": "#DCDCDC",
"regular": false
},
"mid gray": {
"night": "#6A6C6E",
"day": "#6A6C6E",
"trayNight": "#6A6C6E",
"trayDay": "#6A6C6E",
"regular": false
},
"red": {
"night": "#C23E3E",
"day": "#E26767",
"trayNight": "#E94040",
"trayDay": "#D34E4E",
"regular": true
},
"orange": {
"night": "#BF733D",
"day": "#E09B49",
"trayNight": "#DB8825",
"trayDay": "#DC8825",
"regular": true
},
"yellow": {
"night": "#C8AC4B",
"day": "#E7D054",
"trayNight": "#D3B200",
"trayDay": "#D1AF00",
"regular": true
},
"green": {
"night": "#5BB44C",
"day": "#7DCF6F",
"trayNight": "#73D637",
"trayDay": "#5ABE1D",
"regular": true
},
"cyan": {
"night": "#339BA7",
"day": "#59BDC9",
"trayNight": "#1DBED0",
"trayDay": "#0BAEC0",
"regular": true
},
"blue": {
"night": "#5275E9",
"day": "#7291F6",
"trayNight": "#698AFF",
"trayDay": "#6387FF",
"regular": true
},
"violet": {
"night": "#A647BE",
"day": "#B66FCF",
"trayNight": "#D15BFB",
"trayDay": "#C729FF",
"regular": true
}
})

function list() {
var colorNames = []
for (var key in colorMap) {
if (colorMap.hasOwnProperty(key) && colorMap[key].regular) {
colorNames.push(key)
"type": "ui"
},
"mid": {
"night": "#959C9B",
"day": "#878183",
"trayNight": "#909090",
"trayDay": "#AEAEAE",
"type": "ui"
},
"light": {
"night": "#616665",
"day": "#BAB4B4",
"trayNight": "#474747",
"trayDay": "#DCDCDC",
"type": "ui"
},
"lighter": {
"night": "#454747",
"day": "#E0DDDD",
"trayNight": "#474747",
"trayDay": "#DCDCDC",
"type": "ui"
},
"mid gray": {
"night": "#6A6C6E",
"day": "#6A6C6E",
"trayNight": "#6A6C6E",
"trayDay": "#6A6C6E",
"type": "ui"
},
"red": {
"night": "#C23E3E",
"day": "#E26767",
"trayNight": "#E94040",
"trayDay": "#D34E4E",
"type": "palette"
},
"orange": {
"night": "#BF733D",
"day": "#E09B49",
"trayNight": "#DB8825",
"trayDay": "#DC8825",
"type": "palette"
},
"yellow": {
"night": "#C8AC4B",
"day": "#E7D054",
"trayNight": "#D3B200",
"trayDay": "#D1AF00",
"type": "palette"
},
"green": {
"night": "#5BB44C",
"day": "#7DCF6F",
"trayNight": "#73D637",
"trayDay": "#5ABE1D",
"type": "palette"
},
"cyan": {
"night": "#339BA7",
"day": "#59BDC9",
"trayNight": "#1DBED0",
"trayDay": "#0BAEC0",
"type": "palette"
},
"blue": {
"night": "#5275E9",
"day": "#7291F6",
"trayNight": "#698AFF",
"trayDay": "#6387FF",
"type": "palette"
},
"violet": {
"night": "#A647BE",
"day": "#B66FCF",
"trayNight": "#D15BFB",
"trayDay": "#C729FF",
"type": "palette"
},
"osxClose": {
"night": "#FF5F57",
"day": "#FF6058",
"trayNight": "#FF5F52",
"trayDay": "#FF5F52",
"type": "ui"
},
"osxMinimize": {
"night": "#FEBC2D",
"day": "#FEBC2C",
"trayNight": "#FF5F52",
"trayDay": "#FF5F52",
"type": "ui"
},
"osxMaximize": {
"night": "#29C741",
"day": "#28C841",
"trayNight": "#FF5F52",
"trayDay": "#FF5F52",
"type": "ui"
},
"osxInactive": {
"night": "#4C4C48",
"day": "#CCCCCA",
"trayNight": "#FF5F52",
"trayDay": "#FF5F52",
"type": "ui"
}
}
return colorNames
}
})

function getColor(color) {
if (colorMap.hasOwnProperty(color)) {
if (colorsMap.hasOwnProperty(color)) {
if (appSettings.darkMode) {
return colorMap[color].night
return colorsMap[color].night;
} else {
return colorMap[color].day
return colorsMap[color].day;
}
}
return null
return null;
}

function getThemeColor(color) {
if (colorMap.hasOwnProperty(color)) {
if (systemPalette.sysemDarkMode) {
return colorMap[color].trayNight
return colorMap[color].trayNight;
} else {
return colorMap[color].trayDay
return colorMap[color].trayDay;
}
}
return null;
}
function palette() {
const paletteColors = [];
for (const key in colorsMap) {
if (colorsMap.hasOwnProperty(key) && colorsMap[key].type === "palette") {
paletteColors.push(key);
}
}
return null
return paletteColors;
}
}
Loading