-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added support for coloring unfocused windows different, part deux. #64
base: main
Are you sure you want to change the base?
Conversation
bsneed
commented
Nov 4, 2024
- Added config entries for Focused / Unfocused colors.
- Added specific callouts in the reset settings section.
- Fixed wording/typos.
- Refactored "border" to "focused_border".
- Refactored uniform to accept focus flag to pick correct setting.
src/effect/rounded_corners_effect.ts
Outdated
const focusedBorderColor = getPref('focused-border-color'); | ||
const unfocusedBorderColor = getPref('unfocused-border-color'); | ||
|
||
var borderColor = focusedBorderColor; | ||
if (!focused) { | ||
borderColor = unfocusedBorderColor; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flexagoon what's a good way to rework this to just get the right color? js isn't my forte. Elsewhere i'd do something like myColor = focused ? getPref('abc') : getPref('def')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elsewhere i'd do something like
myColor = focused ? getPref('abc') : getPref('def')
You can do the same in JS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well shit, who knew ... that was easy enough.
#: src/preferences/pages/general.ui:74 src/preferences/pages/general.ui:82 | ||
#, fuzzy | ||
msgid "Unfocused border color" | ||
msgstr "Barva okraje" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this the same as the string for the focused border color? This applies to other potfiles as well
@@ -77,7 +77,7 @@ msgstr "Globální nastavení" | |||
|
|||
#: src/preferences/pages/general.ui:27 | |||
#, fuzzy | |||
msgid "These settings will have effect on all windows" | |||
msgid "These settings will have an effect on all windows" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you manually fix this typo? It's probably out of scope for this PR
<key name="border-color" type="(dddd)"> | ||
<summary>Border color for rounded corners window</summary> | ||
<key name="focused-border-color" type="(dddd)"> | ||
<summary>Border color for focused rounded corners window</summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should re-use the existing border-color
pref and use it for both border colors by default, and then have a separate focused-border-color
pref that acts as an override if it's set to a non-null value
@@ -35,8 +35,13 @@ | |||
<default>0</default> | |||
</key> | |||
|
|||
<key name="border-color" type="(dddd)"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're changing prefs schema, you should update the schema version in utils/settings.ts
, and if you remove some keys you have to reset them in that same file (it has a function for that)
let me know if you need assistance with the PR. I would love to get the focus color setting :) |