LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-27-2016, 12:14 AM   #1
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Cannot change highlight background color in gsimplecal


This is not a major issue but it is so vexing! I have been at it for more than a week and i am still stuck with the default blue background highlight. And gtk-theme-config is practically useless.
Standalone Openbox window manager with tint2.
~/,config/gtk-3.0/gtk.css
Code:
/* Custom styles */

/* select-on */
@define-color selected_bg_color #36b03e;
@define-color selected_fg_color #eeeeee;
@define-color theme_selected_bg_color @selected_bg_color;
@define-color theme_selected_fg_color @selected_fg_color;
/* select-on */

/* panel-on */
@define-color panel_bg_color #cccccc;
@define-color panel_fg_color #333333;

PanelWidget,
PanelApplet,
PanelToplevel,
PanelSeparator,
PanelApplet > GtkMenuBar.menubar,
PanelApplet > GtkMenuBar.menubar.menuitem,
PanelMenuBar.menubar,
PanelMenuBar.menubar.menuitem,
PanelAppletFrame,
UnityPanelWidget,
.gnome-panel-menu-bar,
.unity-panel {
	background-image: -gtk-gradient(linear,left top,left bottom,from(shade(@panel_bg_color,1.2)),to(shade(@panel_bg_color,0.8)));
	color: @panel_fg_color;
}

.unity-panel.menuitem,
.unity-panel .menuitem {
	color: @panel_fg_color;
}

.unity-panel.menubar.menuitem:hover,
.unity-panel.menubar .menuitem *:hover {
	border-color: shade(@panel_bg_color, 0.7);
	border-image: none;
	background-image: -gtk-gradient(linear,left top,left bottom,from(shade(@panel_bg_color, 0.97)),to(shade(@panel_bg_color, 0.82)));
	color: @panel_fg_color;
}

PanelApplet .button {
	border-color: transparent;
	border-image: none;
	background-image: -gtk-gradient(linear,left top,left bottom,from(shade(@panel_bg_color,1.2)),to(shade(@panel_bg_color,0.8)));
	color: @panel_fg_color;
	box-shadow: none;
	text-shadow: none;
	-unico-inner-stroke-width: 0;
}

PanelApplet .button:active {
	border-color: shade(@panel_bg_color,0.8);
	border-image: none;
	background-image: -gtk-gradient(linear,left top,left bottom,from(shade(shade(@panel_bg_color,1.02),0.9)),to(shade(shade(@panel_bg_color,1.02),0.95)));
	color: @panel_fg_color;
	box-shadow: none;
	text-shadow: none;
	-unico-inner-stroke-width: 0;
}

PanelApplet .button:prelight {
	border-color: transparent;
	border-image: none;
	background-image: -gtk-gradient(linear,left top,left bottom,from(shade(@panel_bg_color,1.2)),to(shade(@panel_bg_color,1.0)));
	color: @panel_fg_color;
	box-shadow: none;
	text-shadow: none;
	-unico-inner-stroke-width: 0;
}

PanelApplet .button:active:prelight {
	border-color: shade(@panel_bg_color,0.8);
	border-image: none;
	background-image: -gtk-gradient(linear,left top,left bottom,from(shade(shade(@panel_bg_color,1.02),1.0)),to(shade(shade(@panel_bg_color,1.02),1.05)));
	color: @panel_fg_color;
	box-shadow: none;
	text-shadow: none;
	-unico-inner-stroke-width: 0;
}

WnckPager,
WnckTasklist {
	background-color: @panel_bg_color;
}

/* panel-on */

/* menu-on */
@define-color menu_bg_color #2e3436;
@define-color menu_fg_color #eeeeee;

GtkTreeMenu.menu,
GtkMenuToolButton.menu,
GtkComboBox .menu {
	background-color: @menu_bg_color;
}

.primary-toolbar .button .menu,
.toolbar .menu,
.toolbar .primary-toolbar .menu,
.menu {
	border-style: none;
	background-image: none;
	background-color: @menu_bg_color;
	color: @menu_fg_color;
	box-shadow: none;
	text-shadow: none;
	-unico-inner-stroke-width: 0;
}

.menu.button:hover,
.menu.button:active,
.menu.button:active:insensitive,
.menu.button:insensitive,
.menu.button {
	background-color: @menu_bg_color;
	background-image: none;
}

GtkTreeMenu .menuitem * {
	color: @menu_fg_color;
}

.menuitem,
.menu .menuitem {
	background-color: transparent;
}

.menu .menuitem:active,
.menu .menuitem:hover {
	background-color: @theme_selected_bg_color;
}

.menuitem.check,
.menuitem.radio,
.menuitem.check:hover,
.menuitem.radio:hover,
.menuitem.check:active,
.menuitem.radio:active {
	background-color: transparent;
}

.menu .menuitem:insensitive,
.menu .menuitem *:insensitive {
	color: mix(@menu_fg_color,@menu_bg_color,0.5);
}

.menuitem.arrow {
	color: alpha(@menu_fg_color, 0.6);
}

.menuitem .entry {
	border-color: shade(@menu_bg_color,0.7);
	border-image: none;
	background-color: @menu_bg_color;
	background-image: none;
	color: @menu_fg_color;
}

.menuitem .accelerator {
	color: alpha(@menu_fg_color,0.6);
}

.menuitem .accelerator:insensitive {
	color: alpha(mix(@menu_fg_color,@menu_bg_color,0.5),0.6);
	text-shadow: none;
}

.menuitem.separator {
	background-color: transparent;
	color: shade(@menu_bg_color, 0.9);
}

.menuitem GtkCalendar,
.menuitem GtkCalendar.button,
.menuitem GtkCalendar.header,
.menuitem GtkCalendar.view {
	border-color: shade(@menu_bg_color,0.8);
	border-image: none;
	background-color: @menu_bg_color;
	background-image: none;
	color: @menu_fg_color;
}

.menuitem GtkCalendar:inconsistent {
	color: mix(@menu_fg_color,@menu_bg_color,0.5);
}

/* menu-on */
~/.config/gtk-3.0/settings.ini
Code:
[Settings]
gtk-application-prefer-dark-theme = true
gtk-theme-name = Adwaita
gtk-fallback-icon-theme = gnome
gtk-icon-theme-name = Faenza-Dark
gtk-font-name = Terminus 10
~/.config/gsimplecal/config
Code:
show_calendar = 1
              show_timezones = 1
              mark_today = 1
              show_week_numbers = 0
              close_on_unfocus = 0
              external_viewer = sunbird -showdate "%Y-%m-%d"
              clock_format = %a %I:%M:%S %p 
              force_lang = en_US.utf8
              mainwindow_decorated = 0
              mainwindow_keep_above = 1
              mainwindow_sticky = 1
              mainwindow_skip_taskbar = 0
              mainwindow_resizable = 0
              mainwindow_position = none
              mainwindow_xoffset = 2700
              mainwindow_yoffset = 600
              clock_label = UTC
              clock_tz = :UTC
              clock_label = EST
              clock_tz = :EST
Attached Thumbnails
Click image for larger version

Name:	a.png
Views:	123
Size:	23.6 KB
ID:	22224  

Last edited by mzsade; 06-27-2016 at 01:39 PM.
 
Old 06-27-2016, 09:33 AM   #2
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
I've had this issue also with Debian Jessie, Openbox & tint2 setup.

My immediate work around was to recompile with gtk2 instead of gtk3. I don't know much about theming, so I'm not much of a help to debug this.
 
Old 06-27-2016, 01:33 PM   #3
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by kcirick View Post
I've had this issue also with Debian Jessie, Openbox & tint2 setup.

My immediate work around was to recompile with gtk2 instead of gtk3. I don't know much about theming, so I'm not much of a help to debug this.
I am on Debian Sid, also, i've no idea how "to recompile with gtk2", besides that could be too regressive, and possibly a disruptive step in my case. But thanks for the suggestion, i'll keep that in mind. Wish there was something i include in the settings.ini or the gsimplecal/config files, that'd make things so much simpler.
 
Old 06-27-2016, 02:28 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i think they meant to recompile gsimplecal only with gtk2. it is possible, you could have a look at the PKGBUILD for this aur package.
another solution would be to start gsimplecal specifically with a different gtk theme, i think it went something like this:
Code:
GTK_THEME_FILE=/path/to/your/custom/gtkrc gsimplecal
 
Old 06-27-2016, 07:16 PM   #5
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Original Poster
Rep: Reputation: 34
The second option is very attractive, only thing is i do not have a Gnome DE, maybe a few gnome applications which obey the settings.ini i posted earlier, and no gtkrc file which i can try to customize for a particular application. All i have is a lot of OpenBox themerc files in /usr/share/themes but they don't work..lots of theme parsing errors about insensitive and inconsistent pseudo-classes being deprecated. Currently looking through this, hoping i can make something of it.

Edit: Installed clearlooks-phenix with synaptic, it's a gtk3 theme and it gave me both a gtk-2.0 folder with a gtkrc file and a gtk-3.0 folder with a settings.ini file. Tried them both out as you suggested, got theme parsing errors in Terminal with both, the calendar was displayed as before nevertheless.

Last edited by mzsade; 06-27-2016 at 08:08 PM.
 
Old 06-28-2016, 02:07 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
well i don't know how this works with gtk3 (since your gsimplecal uses gtk3, no?), but this is definitely possible with gtk2.
the syntax is:
Code:
GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc audacity
i just checked.
source
you will always get theme parsing errors, e.g.:
Code:
(Audacity:12322): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
$ GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc icedove

(process:13204): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
for all intents and purposes, they are meaningless.
 
Old 06-28-2016, 08:29 AM   #7
kcirick
Member
 
Registered: Dec 2006
Distribution: Slackware 14.1; LFS 7.9-Systemd; Debian Jessie
Posts: 169

Rep: Reputation: 55
Quote:
Originally Posted by mzsade View Post
Edit: Installed clearlooks-phenix with synaptic, it's a gtk3 theme and it gave me both a gtk-2.0 folder with a gtkrc file and a gtk-3.0 folder with a settings.ini file. Tried them both out as you suggested, got theme parsing errors in Terminal with both, the calendar was displayed as before nevertheless.
The theming command for gtk2 and gtk3 are not interchangeable. Even if the theme comes with both GTK2 and GTK3 versions, if the program (in our case gsimplecal) is compiled for GTK3, then it won't work with GTK2 themes, and vice versa.


Would you like to try recompiling with GTK2 and see if that works for you? Get the source from https://github.com/dmedvinsky/gsimplecal then:

Code:
 ./autogen.sh
 ./configure --enable-gtk2
 make
One you are happy with it, you can package it up using checkinstall (it will create a dpkg).
 
Old 07-07-2016, 05:14 PM   #8
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Original Poster
Rep: Reputation: 34
Sorry guys, bad wifi, it's the monsoons here in Bombay, tried posting a longer post but lost connectivity twice before..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can i change the background color of moc konsolelover Linux - Newbie 3 03-28-2017 01:53 PM
Change background color - No X tedcreyn Linux - Newbie 9 07-17-2012 11:47 AM
How to change background color ? wearetheborg Linux - Software 2 09-24-2006 01:17 AM
Change background color chingyenccy Linux - Newbie 6 01-23-2005 03:17 AM
Is there a way to change background color out of X? purpleburple Linux - General 1 01-23-2003 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration