2012-09-29 20:18:19 +02:00
|
|
|
# custom GTK2 style for Geany
|
|
|
|
|
|
|
|
# make close button on the editor's tabs smaller
|
|
|
|
style "geany-close-tab-button-style" {
|
|
|
|
GtkWidget::focus-padding = 0
|
|
|
|
GtkWidget::focus-line-width = 0
|
|
|
|
xthickness = 0
|
|
|
|
ythickness = 0
|
|
|
|
}
|
Fix our custom styles under KDE and for people using gtk-chtheme
We have a custom RC file defining various styles we need, and we want
the user to be able to override them (e.g. if they want -- or need --
other colors). Fair enough, one would simply call gtk_rc_parse() with
the appropriate filename. However, the styling rules applies in the
order they are loaded, then if we load our styles after GTK has loaded
the user's ones we'd override them.
There are 2 solutions to fix this:
1) set our styles' priority to something with lower than "user"
(actually "theme" priority because rules precedence are first
calculated depending on the priority no matter of how precise the
rules is, so we need to override the theme).
2) prepend our custom style to GTK's list while keeping priority to
user (which is the default), so it gets loaded before real user's
ones and so gets overridden by them.
One would normally go for 1 because it's ways simpler and requires less
code: you just have to add the priorities to your styles, which is a
matter of adding a few ":theme" in the RC file. However, KDE being a
bitch it doesn't set the gtk-theme-name but rather directly includes
the style to use in a user gtkrc file, which makes the theme have
"user" priority, hence overriding our styles. So, we cannot set
priorities in the RC file if we want to support running under KDE,
which pretty much leave us with no choice but to go with solution 2,
which unfortunately requires writing ugly code since GTK don't have a
gtk_rc_prepend_default_file() function. Thank you very much KDE.
Though, as a side benefit it also makes the code work with people using
gtk-chtheme, which also found it funny to include the theme in the user
RC file.
2013-03-15 15:54:00 +01:00
|
|
|
widget "*.geany-close-tab-button" style "geany-close-tab-button-style"
|
2012-09-29 20:18:19 +02:00
|
|
|
|
|
|
|
# use monospaced font in search entries for easier reading of regexp (#1907117)
|
|
|
|
style "geany-monospace" {
|
|
|
|
font_name = "Monospace"
|
|
|
|
}
|
Fix our custom styles under KDE and for people using gtk-chtheme
We have a custom RC file defining various styles we need, and we want
the user to be able to override them (e.g. if they want -- or need --
other colors). Fair enough, one would simply call gtk_rc_parse() with
the appropriate filename. However, the styling rules applies in the
order they are loaded, then if we load our styles after GTK has loaded
the user's ones we'd override them.
There are 2 solutions to fix this:
1) set our styles' priority to something with lower than "user"
(actually "theme" priority because rules precedence are first
calculated depending on the priority no matter of how precise the
rules is, so we need to override the theme).
2) prepend our custom style to GTK's list while keeping priority to
user (which is the default), so it gets loaded before real user's
ones and so gets overridden by them.
One would normally go for 1 because it's ways simpler and requires less
code: you just have to add the priorities to your styles, which is a
matter of adding a few ":theme" in the RC file. However, KDE being a
bitch it doesn't set the gtk-theme-name but rather directly includes
the style to use in a user gtkrc file, which makes the theme have
"user" priority, hence overriding our styles. So, we cannot set
priorities in the RC file if we want to support running under KDE,
which pretty much leave us with no choice but to go with solution 2,
which unfortunately requires writing ugly code since GTK don't have a
gtk_rc_prepend_default_file() function. Thank you very much KDE.
Though, as a side benefit it also makes the code work with people using
gtk-chtheme, which also found it funny to include the theme in the user
RC file.
2013-03-15 15:54:00 +01:00
|
|
|
widget "GeanyDialogSearch.*.GtkEntry" style "geany-monospace"
|
|
|
|
widget "GeanyDialogSearch.*.geany-search-entry-no-match" style "geany-monospace"
|
2012-09-29 20:18:19 +02:00
|
|
|
|
|
|
|
# set red background for GtkEntries showing unmatched searches
|
|
|
|
style "geany-search-entry-no-match-style" {
|
|
|
|
base[NORMAL] = "#ffff66666666"
|
|
|
|
text[NORMAL] = "#ffffffffffff"
|
|
|
|
}
|
Fix our custom styles under KDE and for people using gtk-chtheme
We have a custom RC file defining various styles we need, and we want
the user to be able to override them (e.g. if they want -- or need --
other colors). Fair enough, one would simply call gtk_rc_parse() with
the appropriate filename. However, the styling rules applies in the
order they are loaded, then if we load our styles after GTK has loaded
the user's ones we'd override them.
There are 2 solutions to fix this:
1) set our styles' priority to something with lower than "user"
(actually "theme" priority because rules precedence are first
calculated depending on the priority no matter of how precise the
rules is, so we need to override the theme).
2) prepend our custom style to GTK's list while keeping priority to
user (which is the default), so it gets loaded before real user's
ones and so gets overridden by them.
One would normally go for 1 because it's ways simpler and requires less
code: you just have to add the priorities to your styles, which is a
matter of adding a few ":theme" in the RC file. However, KDE being a
bitch it doesn't set the gtk-theme-name but rather directly includes
the style to use in a user gtkrc file, which makes the theme have
"user" priority, hence overriding our styles. So, we cannot set
priorities in the RC file if we want to support running under KDE,
which pretty much leave us with no choice but to go with solution 2,
which unfortunately requires writing ugly code since GTK don't have a
gtk_rc_prepend_default_file() function. Thank you very much KDE.
Though, as a side benefit it also makes the code work with people using
gtk-chtheme, which also found it funny to include the theme in the user
RC file.
2013-03-15 15:54:00 +01:00
|
|
|
widget "*.geany-search-entry-no-match" style "geany-search-entry-no-match-style"
|
2013-02-11 03:31:05 +01:00
|
|
|
|
|
|
|
# document status colors
|
|
|
|
style "geany-document-status-changed-style" {
|
|
|
|
fg[NORMAL] = "#ffff00000000"
|
|
|
|
fg[ACTIVE] = "#ffff00000000"
|
|
|
|
}
|
|
|
|
style "geany-document-status-disk-changed-style" {
|
|
|
|
fg[NORMAL] = "#ffff7fff0000"
|
|
|
|
fg[ACTIVE] = "#ffff7fff0000"
|
|
|
|
}
|
|
|
|
style "geany-document-status-readonly-style" {
|
|
|
|
fg[NORMAL] = "#00007fff0000"
|
|
|
|
fg[ACTIVE] = "#00007fff0000"
|
|
|
|
}
|
Fix our custom styles under KDE and for people using gtk-chtheme
We have a custom RC file defining various styles we need, and we want
the user to be able to override them (e.g. if they want -- or need --
other colors). Fair enough, one would simply call gtk_rc_parse() with
the appropriate filename. However, the styling rules applies in the
order they are loaded, then if we load our styles after GTK has loaded
the user's ones we'd override them.
There are 2 solutions to fix this:
1) set our styles' priority to something with lower than "user"
(actually "theme" priority because rules precedence are first
calculated depending on the priority no matter of how precise the
rules is, so we need to override the theme).
2) prepend our custom style to GTK's list while keeping priority to
user (which is the default), so it gets loaded before real user's
ones and so gets overridden by them.
One would normally go for 1 because it's ways simpler and requires less
code: you just have to add the priorities to your styles, which is a
matter of adding a few ":theme" in the RC file. However, KDE being a
bitch it doesn't set the gtk-theme-name but rather directly includes
the style to use in a user gtkrc file, which makes the theme have
"user" priority, hence overriding our styles. So, we cannot set
priorities in the RC file if we want to support running under KDE,
which pretty much leave us with no choice but to go with solution 2,
which unfortunately requires writing ugly code since GTK don't have a
gtk_rc_prepend_default_file() function. Thank you very much KDE.
Though, as a side benefit it also makes the code work with people using
gtk-chtheme, which also found it funny to include the theme in the user
RC file.
2013-03-15 15:54:00 +01:00
|
|
|
widget "*.geany-document-status-changed" style "geany-document-status-changed-style"
|
|
|
|
widget "*.geany-document-status-disk-changed" style "geany-document-status-disk-changed-style"
|
|
|
|
widget "*.geany-document-status-readonly" style "geany-document-status-readonly-style"
|
2015-04-24 22:15:10 +02:00
|
|
|
|
|
|
|
# red "Terminal" label when terminal dirty
|
|
|
|
widget "*.geany-terminal-dirty" style "geany-document-status-changed-style"
|