intellij-community icon indicating copy to clipboard operation
intellij-community copied to clipboard

IDEA-324382 Window frame respect GTK Theme

Open Pronink opened this issue 11 months ago • 8 comments

Under ide.linux.mimic.system.theme registry key, added GTK styled titlebar buttons with selected icons theme.

Images:

image image image

Video: Youtube video

Changes:

  • Refactoring: Styles specific to Windows and Linux have been split into two classes.
  • New icon colorization mode: colorizeReplace. Used to colorize any icon replacing all pixels.
  • Selection of the chosen icon theme.
  • Retrieval of icons from the selected theme. It supports theme inheritance.
  • Drawing the background circle behind icons using the libadwaita design.
  • It also considers visible action preferences and their sorting configuration (for example, first image only contains x).
  • KDE initial support

To do:

  • Use correct color when light theme with dark topbar (only supports full light theme and full dark theme). Here I need some IntelliJ dev help!
  • Update icons if icon theme or settings changes meanwhile the IDE is open.
  • Resize non 16x16 icon svgs.

Possible, future:

  • IDEA-326222 Add ability to configure window decoration to choose the side where to place a control-buttons

The main intention of this initial PR is to ensure that everything continues to work in all systems as always. Next, we will continue development from these codebase with feedback from users who use other themes or desktop environments. For now, it should work when activating the ide.linux.mimic.system.theme variable in IntelliJ's registry while using Linux.

Related issues:

  • https://youtrack.jetbrains.com/issue/IDEA-199526/Need-an-option-to-remove-the-title-bar-on-Linux
  • https://youtrack.jetbrains.com/issue/IDEA-324382/2023.2-IDE-Window-frame-does-not-respect-GTK-Theme
  • https://youtrack.jetbrains.com/issue/IDEA-326476/Bug-NewUI-looks-like-Windows-on-Linux
  • https://youtrack.jetbrains.com/issue/IDEA-326222/Add-ability-to-configure-window-decoration-to-choose-the-side-where-to-place-a-control-buttons
  • https://youtrack.jetbrains.com/issue/IDEA-325915/New-UI-misplaced-Window-Buttons-under-Linux-KDE
  • https://youtrack.jetbrains.com/issue/IDEA-327340/New-client-side-decorations-in-JB-IDEs-dont-respect-window-decoration-settings-on-Linux
  • https://youtrack.jetbrains.com/issue/IDEA-335513/New-UI-IDEA-has-Windows-like-frame-on-Linux-gnome

Pronink avatar Sep 03 '23 18:09 Pronink

Hello @ybedrov ,

Thank you for taking the time to review my pull request! I would like to know if you have any comments or suggestions regarding the approach I've taken. Is there anything specific I should address or change? I'm here to collaborate and make this pull request the best it can be. Your feedback would be greatly appreciated.

Thanks again! Ismael García

Pronink avatar Oct 16 '23 18:10 Pronink

I made a video showing this feature:

Youtube video

Pronink avatar Nov 12 '23 22:11 Pronink

Nice job man!! What a good touch from your part. Its still incredible how IntellJ devs haven't solved this yet. 😒

captainfulcun avatar Nov 13 '23 08:11 captainfulcun

Nice work.

therealbluepandabear avatar Nov 13 '23 11:11 therealbluepandabear

JetBrains should hire you

therealbluepandabear avatar Nov 13 '23 11:11 therealbluepandabear

Nice job, works perfectly. Hope someone from JetBrains notices this

Carcasus avatar Nov 13 '23 11:11 Carcasus

This change makes IntelliJ IDEA more consistent with my GNOME desktop environment, I hope this will be included in the main line of the project soon.

chardinson avatar Nov 14 '23 21:11 chardinson

Lol when community fix problems of thousand dollars paid engineer... You do a great work, hopefully this will be merged !

ClementGayet avatar Dec 13 '23 21:12 ClementGayet