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

[Enhancement] Respect system GTK theme #245

Closed
11 of 13 tasks
aaronliu0130 opened this issue Nov 8, 2023 · 19 comments · Fixed by #252
Closed
11 of 13 tasks

[Enhancement] Respect system GTK theme #245

aaronliu0130 opened this issue Nov 8, 2023 · 19 comments · Fixed by #252

Comments

@aaronliu0130
Copy link

aaronliu0130 commented Nov 8, 2023

  • channel list text colors are extremely broken
  • chat input box (way too small, clips attachment icon)
  • hover effects look bad/should probably be disabled (might be a theme issue?)
  • attachment boxes are unpadded
  • embeds
  • reactions
  • css color stuff for renderer
  • ScrolledWindow backgrounds
  • chat input size is weird
  • link colors
  • reaction border
  • connection boxes
  • attachment progress bar

You can test this on any system including Windows. See https://stackoverflow.com/questions/36464010/change-gtk3-look-on-windows

@ouwou
Copy link
Member

ouwou commented Nov 9, 2023

a good starting point is to make it look good under the default adwaita/dark adwaita. i edited the issue with a checklist of some stuff that stood out to me right away.
ill probably make all the css changes within css/bare.css (the intention behind it was to be the "minimal" needed css). so for now the respect-the-theme mode is to use css/bare.css as main and make css/application-low-priority.css empty. i think maybe a good end goal is to end up renaming css/bare.css to main and the current theming could just be a gtk3 theme packaged in alongside the binary

and of course if anything else looks broken or ugly under the bare css im open to feedback

@aaronliu0130
Copy link
Author

Sounds good as long as I don’t need to remove the bundled theme to use the system theme every update

@ouwou
Copy link
Member

ouwou commented Nov 28, 2023

okay ive been doing stuff in the theming branch. main.css has been updated to be mostly padding and whatnot and it should look pretty good now under the system GTK theme. theres still some minor stuff that needs tweaking
but at this point id be interested in any feedback as to the appearance (positive or negative, and especially if something looks broken)

@aaronliu0130
Copy link
Author

aaronliu0130 commented Dec 2, 2023

image
Yay, it is native!1!! Some things though:
Left and right sidebars should probably be "shaded" like how file managers shade the left sidebar? IDK what class that is

Nautilus and Caja, file managers

image
image

Also, the text input box is too large, and the send button is on the left for some reason? Is that intended? I also can't find a way to X out of replying and send a normal message instead and I can't see whether a reply has pinged a user.

Being able to drag the sidebars' border closer to the center to make them horizontally wider or narrower would also be nice

@aaronliu0130
Copy link
Author

aaronliu0130 commented Dec 2, 2023

image
Links have a weird color, the channel selector isn't really separated from chat, and numbers emojis in names don't seem to render right (the 8(square)ron Liu on 8(square) is supposed to look like 8️⃣ron Liu on 8️⃣)
image
reactions and integration box borders should perhaps be a gtk theme color instead of black, not sure which tho

most other things look great!

@ouwou
Copy link
Member

ouwou commented Dec 3, 2023

Left and right sidebars should probably be "shaded" like how file managers shade the left sidebar

i think thats because theyre ScrolledWindows. i agree tho so ill try to figure that out

the text input box is too large

also seems like a weird theme issue but hopefully something i can try and fix

the send button is on the left for some reason

that opens the file picker for adding attachments. doesnt really look like it because of your icon theme, im not sure if theres anything better than document-send (which to be fair "Should be an arrow pointing up and away from a hard disk.")

a way to X out of replying

hit escape. a clickable button like discords isnt a bad idea tho

can't see whether a reply has pinged a user

if you mean replies you send the answer is yes its set to ping whoever youre replying to. i might add a toggle for that at the same time i do the click to stop replying thing

Being able to drag the sidebars' border closer to the center to make them horizontally wider or narrower would also be nice

could you explain this more cuz i dont really understand what you mean

Links have a weird color

links dont really exist in GTK, so i have to implement them myself. i might have found a way to pick up the theme color for it though so ill try that out (and change the fallback color while im at it cuz it is weird)

numbers emojis in names don't seem to render right

try disabling the custom emoji handling ([gui] stock_emojis=false). im considering making it false by default anyways its honestly a bit of a relic from before i figured out how to get the font to show color emojis properly on win32

reactions and integration box borders should perhaps be a gtk theme color instead of black, not sure which tho

ill keep that in mind. i think the integration boxes look kinda out of place so ill probably switch that up entirely at some point

@ouwou
Copy link
Member

ouwou commented Dec 3, 2023

ok so the text input box seems to be too big if your theme defines min-height for scrollbar.vertical to be too high (at least in my case thats whats going wrong). i could just disable scroll bars but that seems a bit wrong, so not too sure what to do about this

@ouwou
Copy link
Member

ouwou commented Dec 3, 2023

ok so the text input box seems to be too big if your theme defines min-height for scrollbar.vertical to be too high (at least in my case thats whats going wrong). i could just disable scroll bars but that seems a bit wrong, so not too sure what to do about this

figured it out. just overrode that property so text input height should be fine now

@ouwou
Copy link
Member

ouwou commented Dec 3, 2023

btw, do you know of any themes that actually set the link color (to something unique)? i tried a few and i cant tell if i messed up or the themes just have the same color

@aaronliu0130
Copy link
Author

aaronliu0130 commented Dec 3, 2023

im not sure if theres anything better than document-send (which to be fair "Should be an arrow pointing up and away from a hard disk.")

Well, that's semantically very incorrect, and even GNOME doesn't obey that "should". While it's a status icon, not an action icon, maybe mail-attachment could work?

if you mean replies you send the answer is yes its set to ping whoever youre replying to.

I meant seeing if other users' replies ping or not. In Discord's client, there's a subtle distinction as to whether a reply pings. If it pings, there'll be an @ in front of the replied user's name. If not, there won't.

image

Being able to drag the sidebars' border

Peek 2023-12-03 14-38

try disabling the custom emoji handling

I put the abaddon.ini in the exec's folder and it said it couldn't find the settings file before forgetting my token

do you know of any themes that actually set the link color

no

@ouwou
Copy link
Member

ouwou commented Dec 4, 2023

maybe mail-attachment could work

ill check out some icon themes and ill probably just pick whichever looks like it makes sense across the most

there'll be an @ in front of the replied user's name. If not, there won't

ive never noticed that but should be an easy enough add

sidebars' border

you can already do that. unless im misunderstanding something?

couldn't find the settings file

thats weird... try placing it in ~/.config/abaddon

@aaronliu0130
Copy link
Author

I’ll try the settings when I get home.

sidebars' border

I’m asking about resizing them, which I currently can’t seem to do

@ouwou
Copy link
Member

ouwou commented Dec 5, 2023

its implemented using Gtk.Paned so it should work? not sure what the issue would be
abaddon_Iv1ITjQ9kW

@aaronliu0130
Copy link
Author

Huh... yes it does work, idk what i was on

@ouwou
Copy link
Member

ouwou commented Dec 8, 2023

what theme are you using btw? i tried to see how the shading was working in caja and the only theme i have right now that actually shades it is just targeting a caja-specific selector, no general gtk stuff going on

image

@ouwou ouwou mentioned this issue Dec 9, 2023
@MasterSlenderTR
Copy link

Hello, I'm using the native win32 theme but I seem to have a blue hover color even though my Windows theme uses purple everywhere, how can I set that blue to purple?
Untitled

@ouwou
Copy link
Member

ouwou commented Dec 15, 2023

thats probably a shortcoming in the theme, but you can try editing main.css and adding

treeview:selected {
    background-color: somecolorhere;
}

im not sure how gtk is getting the accent color and i dont use vista so i cant really test that, but you can try the -gtk-win32-color colors listed here: https://github.com/GNOME/gtk/blob/3.24.38/gtk/theme/win32/gtk-win32-base.css

@MasterSlenderTR
Copy link

MasterSlenderTR commented Dec 15, 2023

It's Win7 with Vista styled theme.

@MasterSlenderTR
Copy link

Anyways thanks for your help, I was able to make it purple with the code you gave me.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants