cleanup transparency option

This commit is contained in:
Daniel Micay 2012-05-25 08:05:08 -04:00
parent f9af7d6051
commit 476a3d9975
2 changed files with 4 additions and 6 deletions

View File

@ -12,10 +12,8 @@ static const char *url_regex = "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*";
static const char *url_command = "/usr/bin/firefox"; static const char *url_command = "/usr/bin/firefox";
#endif #endif
//#define TRANSPARENCY // 0.0: opaque, 1.0: transparent
#ifdef TRANSPARENCY //#define TRANSPARENCY 0.2
static const double transparency_level = 0.2;
#endif
static const char *font = "Monospace 9"; static const char *font = "Monospace 9";
static const long scrollback_lines = 1000; static const long scrollback_lines = 1000;

View File

@ -136,8 +136,8 @@ int main(int argc, char **argv) {
if (colormap != NULL) { if (colormap != NULL) {
gtk_widget_set_colormap(window, colormap); gtk_widget_set_colormap(window, colormap);
} }
vte_terminal_set_background_saturation(VTE_TERMINAL(vte), transparency_level); vte_terminal_set_background_saturation(VTE_TERMINAL(vte), TRANSPARENCY);
vte_terminal_set_opacity(VTE_TERMINAL(vte), (guint16)(0xffff * (1 - transparency_level))); vte_terminal_set_opacity(VTE_TERMINAL(vte), (guint16)(0xffff * (1 - TRANSPARENCY)));
#endif #endif
// set colors // set colors