diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-07-06 18:09:25 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-07-06 18:20:32 +0200 |
commit | ecc9bcc2706d2a26309cb48c2d2c7ee6c62e808a (patch) | |
tree | 9f28c3ccc957d5ad486ff17d7c93e970838b63ad /source/theme.c | |
parent | 36856ecbac2049077c046a3a5ba02432efc26501 (diff) |
Re-add some of the old theme options, so theme converter use them.
- line margin
- separator style.
- fake transparency.
- line padding.
- scrollbar width
Diffstat (limited to 'source/theme.c')
-rw-r--r-- | source/theme.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source/theme.c b/source/theme.c index 6e6e4cb3..22017f92 100644 --- a/source/theme.c +++ b/source/theme.c @@ -758,6 +758,49 @@ void rofi_theme_convert_old ( void ) } g_strfreev ( retv ); } + + if ( config.separator_style != NULL ) { + if ( g_strcmp0 ( config.separator_style, "none" ) == 0 ) { + const char *const str = "#window.mainbox.listview box { border: 0px; }"; + rofi_theme_parse_string ( str ); + const char *const str2 = "#window.mainbox.sidebar box { border: 0px; }"; + rofi_theme_parse_string ( str2 ); + } + else if ( g_strcmp0 ( config.separator_style, "solid" ) == 0 ) { + const char *const str = "#window.mainbox.listview box { border: 2px solid 0px 0px 0px; }"; + rofi_theme_parse_string ( str ); + const char *const str2 = "#window.mainbox.sidebar box { border: 2px solid 0px 0px 0px; }"; + rofi_theme_parse_string ( str2 ); + } /* dash is default */ + } + /* Line Margin */ + { + char *str = g_strdup_printf ( "#window.mainbox.listview box { spacing: %dpx;}", config.line_margin ); + rofi_theme_parse_string ( str ); + g_free ( str ); + } + /* Line Padding */ + { + char *str = g_strdup_printf ( "#window.mainbox.listview.element { padding: %dpx;}", config.line_padding ); + rofi_theme_parse_string ( str ); + g_free ( str ); + } + if ( config.hide_scrollbar ) { + const char *str = "#window.mainbox.listview.box { scrollbar: false; }"; + rofi_theme_parse_string ( str ); + } + else { + const char *str = "#window.mainbox.listview.box { scrollbar: true; }"; + rofi_theme_parse_string ( str ); + char *str2 = g_strdup_printf ( "#window.mainbox.listview.scrollbar { handle-width: %dpx; }", config.scrollbar_width ); + rofi_theme_parse_string ( str2 ); + g_free ( str2 ); + } + if ( config.fake_transparency ) { + char *str = g_strdup_printf ( "#window { transparency: \"%s\"; }", config.fake_background ); + rofi_theme_parse_string ( str ); + g_free ( str ); + } } #endif // THEME_CONVERTER |