Fix dynamic width check
The width_set field is true if the width is set in the geometry setting, in other words if a specific (or dynamic) width is set or we want the notification to cover the whole screen. In order to check if a specific width is chosen we need to also exclude dynamic width, meaning the width field has to be non 0; Fixes #614
This commit is contained in:
parent
c797b0e7b3
commit
dda26bfbe9
@ -432,7 +432,7 @@ void load_settings(char *cmdline_config_path)
|
|||||||
// restrict the icon size to a reasonable limit if we have a fixed width.
|
// restrict the icon size to a reasonable limit if we have a fixed width.
|
||||||
// Otherwise the layout will be broken by too large icons.
|
// Otherwise the layout will be broken by too large icons.
|
||||||
// See https://github.com/dunst-project/dunst/issues/540
|
// See https://github.com/dunst-project/dunst/issues/540
|
||||||
if (settings.geometry.width_set) {
|
if (settings.geometry.width_set && settings.geometry.w != 0) {
|
||||||
const int icon_size_limit = settings.geometry.w / 2;
|
const int icon_size_limit = settings.geometry.w / 2;
|
||||||
if ( settings.max_icon_size == 0
|
if ( settings.max_icon_size == 0
|
||||||
|| settings.max_icon_size > icon_size_limit) {
|
|| settings.max_icon_size > icon_size_limit) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user