Recent

Author Topic: Start Lazarus IDE with gtk theme Greybird  (Read 409 times)

John Landmesser

  • New Member
  • *
  • Posts: 25
Start Lazarus IDE with gtk theme Greybird
« on: April 06, 2020, 04:09:58 pm »
perhaps useful for somebody else:

I prefer a dark theme for my Manjaro-XFCE linux, but that theme is bad for lazarus :-(

So i use a script that sets the theme Greybird and restores the given theme when lazarus is closed:

Code: Pascal  [Select][+][-]
  1. #! /bin/bash
  2. # Lazarus mit hellem theme starten, vorhandenes theme nach Beendigung von Lazarus wieder herstellen:
  3.  
  4. # steht doch in ~/.bashrc , warum grad noch mal definieren?
  5. # weil root der Eigentümer ist?
  6. # export PATH=/home/john1/lazarus/:$PATH
  7.  
  8.  
  9.  
  10.  
  11. LAZ=$(which lazarus)
  12.  
  13.  
  14. # wenn  lazarus in PATH nicht existiert ...
  15. if [ ! -f "$LAZ" ]; then
  16.   echo 'lazarus not found'
  17.   echo 'Please edit your PATH environment variable'
  18.   echo 'For Manjaro(Arch) its /etc/profile'
  19.   sleep 2147483647
  20.  
  21. fi
  22.  
  23.  
  24.  
  25. # Theme-Settings abfragen und in Variable speichern
  26. THEME=$(xfconf-query -c xsettings -p /Net/ThemeName)
  27.  
  28.  
  29.  
  30. # helles theme aktivieren
  31. xfconf-query -c xsettings -p /Net/ThemeName -s "Greybird"
  32.  
  33.  
  34.  
  35. # Lazarus starten, PID ermitteln und auf Beendigung des Prozesses warten:
  36.  "$LAZ"
  37. # pgrep -f kann auch mit langen DateiNamen umgehen
  38.  p=$(pgrep -f '$LAZ')
  39.  wait $p
  40.  
  41. # in Variable gespeichertes theme wieder herstellen
  42. xfconf-query -c xsettings -p /Net/ThemeName -s "$THEME"
  43.  
« Last Edit: April 07, 2020, 10:51:00 am by John Landmesser »

avra

  • Hero Member
  • *****
  • Posts: 1884
    • Additional info
Re: Start Lazarus IDE with gtk theme Greybird
« Reply #1 on: April 06, 2020, 05:48:04 pm »
I prefer a dark theme for my Manjaro linux, but that theme is bad for lazarus :-(
No, dark theme is not bad for Lazarus. But default colors look bad in message window when theme is dark. I solve it simply by applying dark pastel colors.

Long time ago I have added alternative harmonic light pastel colors to Lazarus message window since I have found original colors too distracting. These look very good on light OS theme with black font. Later I used dark OS theme and for white font different colors were needed so I have also created dark pastel colors. Unfortunately I didn't contribute them to Lazarus yet. That is not a problem since you can do it yourself. Replace default (R, G, B) Header Colors for Background with (35, 39, 41), for Running with (129, 100, 0), for Success with (9, 88, 0), for Failed with (128, 0, 3), and Scrolled Up with (0, 10, 85) and you will have Message window Header Colors as shown in the screenshot. You can also adapt Message Colors to your liking if you wish.

Light pastel colors history: https://forum.lazarus.freepascal.org/index.php/topic,27412.msg170391.html#msg170391

Attached screenshots are from Manjaro XFCE having Adwait-dark style with message window showing dark pastel colors mentioned above.
« Last Edit: April 06, 2020, 05:53:55 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

John Landmesser

  • New Member
  • *
  • Posts: 25
Re: Start Lazarus IDE with gtk theme Greybird
« Reply #2 on: April 06, 2020, 06:06:15 pm »
I startet this script because i had probs reading component captions(?) on my form designer:

See attached screenshot.

Also on Manjaro XFCE Adwaita-dark.


avra

  • Hero Member
  • *****
  • Posts: 1884
    • Additional info
Re: Start Lazarus IDE with gtk theme Greybird
« Reply #3 on: April 06, 2020, 08:30:15 pm »
I startet this script because i had probs reading component captions
Then I apologize for misunderstanding the problem. You can see mine. It can be improved but does not bother me that much.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018