Skip to content

Commit

Permalink
Add an option to disable shading by titlebar scrolling
Browse files Browse the repository at this point in the history
Implements #4.
  • Loading branch information
XRevan86 committed Mar 16, 2016
1 parent edbdc92 commit 0b82664
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions defaults/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ button_fade_pulse_min_opacity=0
hover_cursor=1
[titlebars]
double_click_action=0
no_scroll_shade=0
[decorations]
use_decoration_cropping=true
blur_type=0
3 changes: 2 additions & 1 deletion include/emerald.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ typedef struct _window_settings

gint double_click_action;
gint button_hover_cursor;
gboolean titlebar_no_scroll_shade;

gboolean round_top_left;
gboolean round_top_right;
Expand All @@ -176,7 +177,7 @@ typedef struct _window_settings

gboolean use_button_glow;
gboolean use_button_inactive_glow;
gboolean use_decoration_cropping;
gboolean use_decoration_cropping;
gboolean use_button_fade;
GdkPixbuf * ButtonGlowPix[B_COUNT];
GdkPixbuf * ButtonGlowArray;
Expand Down
3 changes: 3 additions & 0 deletions po/en_GB.po
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ msgstr "Show Tooltips for Buttons"
msgid "Use Decoration Cropping"
msgstr "Use Decoration Cropping"

msgid "No Shade on Titlebar Scroll"
msgstr "No Shade on Titlebar Scroll"

msgid "Use Button Fade"
msgstr "Use Button Fade"

Expand Down
3 changes: 3 additions & 0 deletions po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ msgstr "Показывать всплывающие подсказки для т
msgid "Use Decoration Cropping"
msgstr "Использовать обрезку декораций"

msgid "No Shade on Titlebar Scroll"
msgstr "Не сворачивать окно в заголовок при его прокрутке"

msgid "Use Button Fade"
msgstr "Использовать затухание кнопок"

Expand Down
6 changes: 4 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4425,12 +4425,12 @@ static void title_event(WnckWindow * win, XEvent * xevent)
}
else if (xevent->xbutton.button == 4)
{
if (!wnck_window_is_shaded(win))
if (!ws->titlebar_no_scroll_shade && !wnck_window_is_shaded(win))
wnck_window_shade(win);
}
else if (xevent->xbutton.button == 5)
{
if (wnck_window_is_shaded(win))
if (!ws->titlebar_no_scroll_shade && wnck_window_is_shaded(win))
wnck_window_unshade(win);
}
}
Expand Down Expand Up @@ -5448,6 +5448,8 @@ static void load_settings(window_settings * ws)
load_int_setting(f, &ws->double_click_action, "double_click_action",
"titlebars");
load_int_setting(f, &ws->button_hover_cursor, "hover_cursor", "buttons");
load_bool_setting(f, &ws->titlebar_no_scroll_shade,
"no_scroll_shade", "titlebars");
load_bool_setting(f, &ws->use_decoration_cropping,
"use_decoration_cropping", "decorations");
load_bool_setting(f, &ws->use_button_fade, "use_button_fade", "buttons");
Expand Down
4 changes: 4 additions & 0 deletions themer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,10 @@ void layout_settings_pane(GtkWidget * vbox)
gtk_box_pack_startC(vbox,junk,FALSE,FALSE,0);
register_setting(junk,ST_SFILE_BOOL,"decorations","use_decoration_cropping");

junk = gtk_check_button_new_with_label(_("No Shade on Titlebar Scroll"));
gtk_box_pack_startC(vbox,junk,FALSE,FALSE,0);
register_setting(junk,ST_SFILE_BOOL,"titlebars","no_scroll_shade");

junk = gtk_check_button_new_with_label(_("Use Button Fade"));
gtk_box_pack_startC(vbox,junk,FALSE,FALSE,0);
register_setting(junk,ST_SFILE_BOOL,"buttons","use_button_fade");
Expand Down

0 comments on commit 0b82664

Please sign in to comment.