From a69ec9973b411c05c890398f7b747f6eac19b241 Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Mon, 11 Aug 2025 14:45:18 -0300 Subject: [PATCH] :recycle: refactor: correctly organize resources in the resources directory --- resources.gresource.xml | 29 ++ .../icons/applications-other-symbolic.svg | 0 .../arrow-circular-top-right-symbolic.svg | 0 .../icons/circle-filled-symbolic.svg | 0 .../icons/hourglass-symbolic.svg | 0 .../icons/loop-arrow-symbolic.svg | 0 .../icons/minus-circle-filled-symbolic.svg | 0 .../icons/shield-danger-symbolic.svg | 0 .../icons/shield-safe-symbolic.svg | 0 .../icons/user-trash-symbolic.svg | 0 .../styles}/_apps-window.scss | 0 {src/style => resources/styles}/_bar.scss | 0 .../styles}/_center-window.scss | 0 {src/style => resources/styles}/_colors.scss | 0 .../styles}/_control-center.scss | 0 .../styles}/_float-notifications.scss | 0 .../styles}/_logout-menu.scss | 0 {src/style => resources/styles}/_mixins.scss | 0 {src/style => resources/styles}/_osd.scss | 0 {src/style => resources/styles}/_runner.scss | 0 {src/style => resources/styles}/_wal.scss | 0 resources/styles/main.scss | 314 ++++++++++++++++++ src/tsconfig.json => tsconfig.json | 2 +- 23 files changed, 344 insertions(+), 1 deletion(-) create mode 100644 resources.gresource.xml rename {src => resources}/icons/applications-other-symbolic.svg (100%) rename {src => resources}/icons/arrow-circular-top-right-symbolic.svg (100%) rename {src => resources}/icons/circle-filled-symbolic.svg (100%) rename {src => resources}/icons/hourglass-symbolic.svg (100%) rename {src => resources}/icons/loop-arrow-symbolic.svg (100%) rename {src => resources}/icons/minus-circle-filled-symbolic.svg (100%) rename {src => resources}/icons/shield-danger-symbolic.svg (100%) rename {src => resources}/icons/shield-safe-symbolic.svg (100%) rename {src => resources}/icons/user-trash-symbolic.svg (100%) rename {src/style => resources/styles}/_apps-window.scss (100%) rename {src/style => resources/styles}/_bar.scss (100%) rename {src/style => resources/styles}/_center-window.scss (100%) rename {src/style => resources/styles}/_colors.scss (100%) rename {src/style => resources/styles}/_control-center.scss (100%) rename {src/style => resources/styles}/_float-notifications.scss (100%) rename {src/style => resources/styles}/_logout-menu.scss (100%) rename {src/style => resources/styles}/_mixins.scss (100%) rename {src/style => resources/styles}/_osd.scss (100%) rename {src/style => resources/styles}/_runner.scss (100%) rename {src/style => resources/styles}/_wal.scss (100%) create mode 100644 resources/styles/main.scss rename src/tsconfig.json => tsconfig.json (94%) diff --git a/resources.gresource.xml b/resources.gresource.xml new file mode 100644 index 0000000..21a466c --- /dev/null +++ b/resources.gresource.xml @@ -0,0 +1,29 @@ + + + + + styles/style.scss + style/_apps-window.scss + styles/_bar.scss + styles/_center-window.scss + styles/_control-center.scss + styles/_float-notifications.scss + styles/_logout-menu.scss + styles/_mixins.scss + styles/_osd.scss + styles/_runner.scss + + + + + icons/applications-other-symbolic.svg + icons/arrow-circular-top-right-symbolic.svg + icons/circle-filled-symbolic.svg + icons/hourglass-symbolic.svg + icons/loop-arrow-symbolic.svg + icons/minus-circle-filled-symbolic.svg + icons/shield-danger-symbolic.svg + icons/shield-safe-symbolic.svg + icons/user-trash-symbolic.svg + + diff --git a/src/icons/applications-other-symbolic.svg b/resources/icons/applications-other-symbolic.svg similarity index 100% rename from src/icons/applications-other-symbolic.svg rename to resources/icons/applications-other-symbolic.svg diff --git a/src/icons/arrow-circular-top-right-symbolic.svg b/resources/icons/arrow-circular-top-right-symbolic.svg similarity index 100% rename from src/icons/arrow-circular-top-right-symbolic.svg rename to resources/icons/arrow-circular-top-right-symbolic.svg diff --git a/src/icons/circle-filled-symbolic.svg b/resources/icons/circle-filled-symbolic.svg similarity index 100% rename from src/icons/circle-filled-symbolic.svg rename to resources/icons/circle-filled-symbolic.svg diff --git a/src/icons/hourglass-symbolic.svg b/resources/icons/hourglass-symbolic.svg similarity index 100% rename from src/icons/hourglass-symbolic.svg rename to resources/icons/hourglass-symbolic.svg diff --git a/src/icons/loop-arrow-symbolic.svg b/resources/icons/loop-arrow-symbolic.svg similarity index 100% rename from src/icons/loop-arrow-symbolic.svg rename to resources/icons/loop-arrow-symbolic.svg diff --git a/src/icons/minus-circle-filled-symbolic.svg b/resources/icons/minus-circle-filled-symbolic.svg similarity index 100% rename from src/icons/minus-circle-filled-symbolic.svg rename to resources/icons/minus-circle-filled-symbolic.svg diff --git a/src/icons/shield-danger-symbolic.svg b/resources/icons/shield-danger-symbolic.svg similarity index 100% rename from src/icons/shield-danger-symbolic.svg rename to resources/icons/shield-danger-symbolic.svg diff --git a/src/icons/shield-safe-symbolic.svg b/resources/icons/shield-safe-symbolic.svg similarity index 100% rename from src/icons/shield-safe-symbolic.svg rename to resources/icons/shield-safe-symbolic.svg diff --git a/src/icons/user-trash-symbolic.svg b/resources/icons/user-trash-symbolic.svg similarity index 100% rename from src/icons/user-trash-symbolic.svg rename to resources/icons/user-trash-symbolic.svg diff --git a/src/style/_apps-window.scss b/resources/styles/_apps-window.scss similarity index 100% rename from src/style/_apps-window.scss rename to resources/styles/_apps-window.scss diff --git a/src/style/_bar.scss b/resources/styles/_bar.scss similarity index 100% rename from src/style/_bar.scss rename to resources/styles/_bar.scss diff --git a/src/style/_center-window.scss b/resources/styles/_center-window.scss similarity index 100% rename from src/style/_center-window.scss rename to resources/styles/_center-window.scss diff --git a/src/style/_colors.scss b/resources/styles/_colors.scss similarity index 100% rename from src/style/_colors.scss rename to resources/styles/_colors.scss diff --git a/src/style/_control-center.scss b/resources/styles/_control-center.scss similarity index 100% rename from src/style/_control-center.scss rename to resources/styles/_control-center.scss diff --git a/src/style/_float-notifications.scss b/resources/styles/_float-notifications.scss similarity index 100% rename from src/style/_float-notifications.scss rename to resources/styles/_float-notifications.scss diff --git a/src/style/_logout-menu.scss b/resources/styles/_logout-menu.scss similarity index 100% rename from src/style/_logout-menu.scss rename to resources/styles/_logout-menu.scss diff --git a/src/style/_mixins.scss b/resources/styles/_mixins.scss similarity index 100% rename from src/style/_mixins.scss rename to resources/styles/_mixins.scss diff --git a/src/style/_osd.scss b/resources/styles/_osd.scss similarity index 100% rename from src/style/_osd.scss rename to resources/styles/_osd.scss diff --git a/src/style/_runner.scss b/resources/styles/_runner.scss similarity index 100% rename from src/style/_runner.scss rename to resources/styles/_runner.scss diff --git a/src/style/_wal.scss b/resources/styles/_wal.scss similarity index 100% rename from src/style/_wal.scss rename to resources/styles/_wal.scss diff --git a/resources/styles/main.scss b/resources/styles/main.scss new file mode 100644 index 0000000..9b862b3 --- /dev/null +++ b/resources/styles/main.scss @@ -0,0 +1,314 @@ +@use "sass:color"; + +@use "./style/wal"; +@use "./style/mixins"; +@use "./style/functions"; +@use "./style/colors"; + +@use "./style/bar"; +@use "./style/osd"; +@use "./style/control-center"; +@use "./style/center-window"; +@use "./style/float-notifications"; +@use "./style/logout-menu"; +@use "./style/apps-window"; +@use "./style/runner"; + + +* { + @include mixins.reset-props; +} + +entry { + background: colors.$bg-primary; + padding: 10px 9px; + border-radius: 12px; + + &:focus { + box-shadow: inset 0 0 0 2px colors.$bg-secondary; + } + + & image.left { + margin-right: 6px; + } +} + +.custom-dialog-container { + background: colors.$bg-translucent; + padding: 18px; + border-radius: 24px; + + & .title { + font-size: 21px; + font-weight: 700; + margin-bottom: 10px; + } + + & .text { + font-size: 16px; + font-weight: 400; + } + + & .options { + & button { + @include mixins.button-reactive-primary; + background: colors.$bg-primary; + border-radius: 12px; + padding: 9px 6px; + + & label { + font-size: 16px; + font-weight: 600; + } + + margin: { + left: 4px; + right: 4px; + }; + } + } + + &.entry-popup-box entry { + margin-bottom: 10px; + + &.password { + font-size: 14px; + font-family: "Adwaita Mono", "Cantarell Mono", "Noto Sans Mono", monospace; + font-weight: 400; + } + } +} + +.notification { + background: colors.$bg-translucent-secondary; + border-radius: 16px; + + & > .top { + padding: 8px; + padding-bottom: 0; + + & .app-icon { + margin-right: 6px; + } + + & .app-name { + font-size: 12px; + } + + + & label.time { + font-size: 11px; + font-weight: 500; + color: colors.$fg-disabled; + margin-right: 6px; + } + + & button.close { + padding: 2px; + border-radius: 8px; + + &:hover { + background: colors.$bg-secondary; + } + } + + & icon.close { + font-size: 16px; + } + } + + & .content { + padding: 6px; + padding-top: 0; + + & .image { + $size: 78px; + min-width: $size; + min-height: $size; + background-size: cover; + background-position: center; + margin: 6px; + border-radius: 8px; + } + + & .summary { + font-size: 17.3px; + font-weight: 700; + margin-bottom: 4px; + } + + & .body { + font-size: 14.5px; + font-weight: 400; + } + } + + & .actions { + padding: 6px; + + & button.action { + border-radius: 4px; + background: colors.$bg-secondary; + padding: 6px; + + & label { + font-size: 14px; + font-weight: 600; + } + + &:hover { + background: colors.$bg-tertiary; + } + + &:first-child { + border-top-left-radius: 12px; + border-bottom-left-radius: 12px; + } + &:last-child { + border-top-right-radius: 12px; + border-bottom-right-radius: 12px; + } + } + } +} + +tooltip > box { + padding: 7px 8px; + margin: 12px; + margin-top: 0; + border-radius: 12px; + background: rgba(colors.$bg-primary, .98); + box-shadow: 0 5px 6px 1px colors.$bg-translucent-primary; + + & label { + font-size: 13.1px; + font-weight: 500; + color: colors.$fg-primary; + } +} + +popover.menu contents { + background: wal.$background; + border-radius: 14px; + padding: 4px; + + & viewport > stack > * > * > * { + & > separator { + min-height: .5px; + margin: 3px 2px; + background: rgba(colors.$fg-disabled, .1); + } + + & > *:not(separator) > * { + padding: 6px; + border-radius: 10px; + font-size: 12px; + font-weight: 600; + + &:hover, &:focus { + background: wal.$color1; + } + } + } +} + +.button-row { + & > button { + $active-radius: 8px; + $corner-radius: calc($active-radius + 2px); + + background: colors.$bg-secondary; + margin: 0 1px; + padding: 4px 6px; + border-radius: 2px; + transition: 120ms linear; + + &:hover { + background: colors.$bg-tertiary; + } + + &:active { + border-radius: $active-radius; + } + + &:first-child { + margin-left: 0; + + &:not(:active) { + border-top-left-radius: $corner-radius; + border-bottom-left-radius: $corner-radius; + } + } + + &:last-child { + margin-right: 0; + + &:not(:active) { + border-top-right-radius: $corner-radius; + border-bottom-right-radius: $corner-radius; + } + } + } +} + +selection { + background: colors.$bg-tertiary; +} + +trough { + background: color.adjust($color: colors.$bg-primary, $lightness: -5%); + border-radius: 8px; + margin: 2px 0; +} + +trough highlight { + background: wal.$color1; + min-height: .9em; +} + +trough slider { + border-radius: 50%; + margin: -4px 0; + background: wal.$foreground; + min-width: 1.2em; + min-height: 1.2em; +} + +scrollbar trough { + @include mixins.reset-props; + + background: colors.$bg-translucent; + border-radius: 8px; + + & slider { + @include mixins.reset-props; + + min-width: .45em; + background: colors.$bg-tertiary; + border-radius: 12px; + + &:hover, &:active, &:focus { + margin: 2px; + } + } + + &:hover, &:active, &:focus { + padding: 2px; + } +} + +scale { + & marks mark { + & indicator { + color: colors.$fg-disabled; + min-width: 1px; + min-height: 6px; + } + + & label { + font-size: 11px; + font-weight: 400; + color: colors.$fg-disabled; + } + } +} diff --git a/src/tsconfig.json b/tsconfig.json similarity index 94% rename from src/tsconfig.json rename to tsconfig.json index 4666781..dec454e 100644 --- a/src/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,7 @@ "moduleResolution": "bundler", "skipLibCheck": true, "types": [ - "../@girs" + "./@girs" ], "strict": true, "jsx": "react-jsx",