Skip to content

Commit

Permalink
Issue #230 - Remove window shadow if --no-window-shadow arg is supplied
Browse files Browse the repository at this point in the history
  • Loading branch information
gornostal committed Oct 27, 2019
1 parent 1f7bc16 commit a7b869d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
3 changes: 3 additions & 0 deletions data/styles/preferences.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
.app-box {
box-shadow: 0 0 7px rgba(0, 0, 0, 0.4);
}
.no-window-shadow {
box-shadow: none;
}
6 changes: 1 addition & 5 deletions data/themes/adwaita/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,4 @@
}
.prefs-btn:hover {
background-color: @prefs_backgroud;
}

.no-window-shadow {
margin: -20px;
}
}
6 changes: 1 addition & 5 deletions data/themes/dark/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,4 @@
}
.prefs-btn:hover {
background-color: @prefs_backgroud;
}

.no-window-shadow {
margin: -20px;
}
}
9 changes: 4 additions & 5 deletions data/themes/light/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
border: 1px solid @window_border_color;
border-radius: 4px;
}
.no-window-shadow {
box-shadow: none;
}

.input {
color: @input_color;
Expand Down Expand Up @@ -100,8 +103,4 @@
}
.prefs-btn:hover {
background-color: @prefs_backgroud;
}

.no-window-shadow {
margin: -20px;
}
}
6 changes: 1 addition & 5 deletions data/themes/ubuntu/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,4 @@
}
.prefs-btn:hover {
background-color: @prefs_backgroud;
}

.no-window-shadow {
margin: -20px;
}
}
6 changes: 6 additions & 0 deletions ulauncher/ui/windows/PreferencesUlauncherDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,19 @@ def finish_initializing(self, builder):

self.settings = Settings.get_instance()
self._init_webview()
self._handle_no_window_shadow_option(self.ui['window_wrapper'])
self.init_styles(get_data_file('styles', 'preferences.css'))
self.autostart_pref = AutostartPreference()
self.hotkey_dialog = HotkeyDialog()
self.hotkey_dialog.connect('hotkey-set', self.on_hotkey_set)

self.show_all()

def _handle_no_window_shadow_option(self, window_wrapper):
# removing window shadow solves issue with DEs without a compositor (#230)
if get_options().no_window_shadow:
window_wrapper.get_style_context().add_class('no-window-shadow')

def _init_webview(self):
"""
Initialize preferences WebView
Expand Down

0 comments on commit a7b869d

Please sign in to comment.