LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 05-17-2011, 12:33 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,193

Rep: Reputation: Disabled
Question How to remove menus' gradient in GTK+ Crux theme?


Need to edit gtk-2.0 file of this theme to remove menus' gradient and let other gradients remain. Please help.
 
Old 05-17-2011, 12:31 PM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,751

Rep: Reputation: 188Reputation: 188
Are you using gnome, xfce, fluxbox?

Post the part of the gtkrc that you are having problems with.

Or if it's a styles rc post the part of that.

Not much info given.
 
Old 05-17-2011, 12:55 PM   #3
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,193

Original Poster
Rep: Reputation: Disabled
I am using IceWM, Crux theme for GTK+, the config of Crux is:

Code:
gtk_color_scheme = "fg_color:#000;bg_color:#d3d7cf;base_color:#fff;text_color:#000;selected_bg_color:#2C72C7;selected_fg_color:#fff;tooltip_bg_color:#F5F5B5;tooltip_fg_color:#000"


style "default"
{
  fg[NORMAL]        = @fg_color           # was 000000 --> OK
  fg[PRELIGHT]      = @fg_color           # was 000000 --> OK
  fg[SELECTED]      = @selected_fg_color  # was ffffff --> OK
  fg[ACTIVE]        = @fg_color           # was 000000 --> OK
  fg[INSENSITIVE]   = darker (@bg_color)  # was 888a85 --> ??

  bg[NORMAL]        = @bg_color                # was d3d7cf --> NO?
  bg[PRELIGHT]      = shade (1.02, @bg_color)  # was ededeb --> NO?
  bg[SELECTED]      = @selected_bg_color       # was 75507b --> OK
  bg[INSENSITIVE]   = @bg_color                # was c4c6c0 --> OK?
  bg[ACTIVE]        = shade (0.9, @bg_color)   # was a3a69f --> ??

  base[NORMAL]      = @base_color              # was ffffff --> OK
  base[PRELIGHT]    = shade (0.95, @bg_color)  # was 000000 --> NO?
  base[ACTIVE]      = shade (0.9, @selected_bg_color)  # undefined
  base[SELECTED]    = @selected_bg_color       # 75507b --> OK
  base[INSENSITIVE] = @bg_color                # dddddd --> NO

  text[NORMAL]      = @text_color         # was 000000 --> OK
  text[PRELIGHT]    = @text_color         # was 000000 --> OK
  text[ACTIVE]      = @selected_fg_color  # was 000000 --> OK 
  text[SELECTED]    = @selected_fg_color  # was undefined
  text[INSENSITIVE] = darker (@bg_color)  # was 888a85 --> ??

  GtkRange::slider_width = 13
  GtkRange::stepper_size = 13
  GtkRange::trough_border = 1

  GtkScale::slider_width = 12
  GtkScale::stepper_size = 12
  GtkScale::trough_border = 0

  GtkScale::slider_length = 16
  GtkCheckButton::indicator_size = 12
  GtkCheckButton::indicator_spacing = 3
  GtkCheckMenuItem::indicator_size = 10

  GtkOptionMenu::indicator_size = { 11, 6 }
  GtkOptionMenu::indicator_spacing = { 30, 5, 2, 2 }

  GtkScrollbar::min_slider_length = 25

  engine "crux-engine" {  }
}

# common default
class "GtkWidget" style "default"

# Style used for (prelighted) menu items
style "menuitem"
{
  fg[PRELIGHT] = @selected_fg_color # was 000000 --> OK
  bg[PRELIGHT] = @selected_bg_color # was 75507b --> OK
}

class "GtkMenuItem" style "menuitem"
widget_class "*.*MenuItem.*" style "menuitem"


style "menu"
{
  xthickness = 3
}

# This enables gradiented menu backgrounds
class "GtkMenu" style "menu"

style "entry"
{
  xthickness = 3
  ythickness = 3

  # Slightly lighter so that the selection will be visible properly
  bg[SELECTED] = mix(0.85, @selected_bg_color, @base_color)

  engine "crux-engine"
  {
    thickness = 3
  }
}

# some extra padding around text entries, so the focus marking fits
class "GtkEntry" style "entry"
class "GtkText" style "entry"

style "trough"
{
   bg[NORMAL] = shade (0.9, @bg_color)
   # fg[PRELIGHT] is used for the text underneath the bar.
   fg[PRELIGHT] = @selected_fg_color
}
class "GtkProgressBar" style "trough"

style "statusbar"
{
   xthickness = 3
   ythickness = 3
}
class "GtkStatusbar" style "statusbar"

style "crux-tooltips"
{
        xthickness = 4
        ythickness = 4

        bg[NORMAL] = @tooltip_bg_color
        fg[NORMAL] = @tooltip_fg_color
}

# The window of the tooltip is called "gtk-tooltip"
################################
# FIXME:
# This will not work if one embeds eg. a button into the tooltip.
# As far as I can tell right now we will need to rework the theme
# quite a bit to get this working correctly.
# (It will involve setting different priorities, etc.)
################################
widget "gtk-tooltip*" style "crux-tooltips"

# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
# Note that the work around assumes that the combobox is _not_ in
# appears-as-list mode.
# This style does not affect GtkComboBoxEntry, it does have an effect
# on comboboxes in appears-as-list mode though.
style "crux-text-is-fg-color-workaround"
{
	text[NORMAL]        = @fg_color
	text[PRELIGHT]      = @fg_color
	text[SELECTED]      = @selected_fg_color
	text[ACTIVE]        = @fg_color
	text[INSENSITIVE]   = darker (@bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>"   style "crux-text-is-fg-color-workaround"

style "crux-menuitem-text-is-fg-color-workaround"
{
	text[NORMAL]        = @fg_color
	text[PRELIGHT]      = @selected_fg_color
	text[SELECTED]      = @selected_fg_color
	text[ACTIVE]        = @fg_color
	text[INSENSITIVE]   = darker (@bg_color)
}
widget "*.gtk-combobox-popup-menu.*"   style "crux-menuitem-text-is-fg-color-workaround"

# Work around the usage of GtkLabel inside GtkListItems to display text.
# This breaks because the label is shown on a background that is based on the
# base color set.
style "crux-fg-is-text-color-workaround"
{
	fg[NORMAL]      = @text_color
	fg[PRELIGHT]    = @text_color
	fg[ACTIVE]      = @selected_fg_color
	fg[SELECTED]    = @selected_fg_color
	fg[INSENSITIVE] = darker (@bg_color)
}
widget_class "*<GtkListItem>*" style "crux-fg-is-text-color-workaround"
# The same problem also exists for GtkCList and GtkCTree
# Only match GtkCList and not the parent widgets, because that would also change the headers.
widget_class "*<GtkCList>" style "crux-fg-is-text-color-workaround"
I need to remove menus' gradient and leave all other gradients.
 
Old 05-17-2011, 01:34 PM   #4
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,751

Rep: Reputation: 188Reputation: 188
I didn't know if you were trying to change the color gradient of the menu backgrounds, the kind of gradient of the background or what.
I am not famliar with Ice.

Did you see in that file
Code:
# This enables gradiented menu backgrounds
class "GtkMenu" style "menu"

style "entry"
{
  xthickness = 3
  ythickness = 3

  # Slightly lighter so that the selection will be visible properly
  bg[SELECTED] = mix(0.85, @selected_bg_color, @base_color)
Or are you looking for somethng like
Code:
menu.hilite:						flat gradient vertical
menu.hilite.color:					darkred
menu.hilite.colorTo:					maroon
menu.hilite.textColor:					white
If so you'll have to find out where ICE keeps it's config files.

Gtk themes take care of the app txt, foregrounds, buttons etc. A WM theme takes care of window headers, titles, menus etc.
Sorry I don't know how Ice does that.

http://www.google.com/search?q=icewm...ient=firefox-a

Last edited by teckk; 05-17-2011 at 01:36 PM.
 
Old 05-17-2011, 01:55 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by teckk View Post
A WM theme takes care of menus
Wrong. GTK+ (or whatever toolkit the app uses) does.
 
Old 05-17-2011, 02:16 PM   #6
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,751

Rep: Reputation: 188Reputation: 188
Well not always.

Fluxbox for example has a seperate styles config file apart from ~/.gtk*rc and ~/.themes that defines how menus, headers, menu frames, menu titles look.
 
Old 05-17-2011, 03:39 PM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by teckk View Post
Well not always.

Fluxbox for example has a seperate styles config file apart from ~/.gtk*rc and ~/.themes that defines how menus, headers, menu frames, menu titles look.
Are you talking about the menus like when you right-click the titlebar or the desktop?

Because I'm talking about the menu bar in applications (this is what I thought the OP was talking about).
 
Old 05-17-2011, 05:55 PM   #8
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,751

Rep: Reputation: 188Reputation: 188
Quote:
Because I'm talking about the menu bar in applications (this is what I thought the OP was talking about).
Oh ok, I understand both of you now then.

gtk+ does that. I thought that he meant his desktop menu's

To the OP
http://live.gnome.org/GnomeArt/Tutorials/GtkThemes
http://ubuntuforums.org/showthread.php?t=377397
 
Old 05-18-2011, 04:46 AM   #9
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,193

Original Poster
Rep: Reputation: Disabled
Quote:
Because I'm talking about the menu bar in applications (this is what I thought the OP was talking about).
Yes, I mean GTK themes, IceWM has nothing to do with them.
And I checked the links, tried editing everything I was thinking of but it gives no result.
 
Old 05-18-2011, 09:06 AM   #10
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,751

Rep: Reputation: 188Reputation: 188
Here is a dark theme that I made a while back if you can glean anything from it.
Uses a different engine though.

Code:
style "clearlooks-default"
{
  GtkMenuItem::selected_shadow_type = out
  GtkWidget::interior_focus = 1
  GtkButton::default_border = { 0, 0, 0, 0 }
  GtkButton::default_outside_border = { 0, 0, 0, 0 }
  GtkRange::trough_border = 0

  GtkWidget::focus_padding = 1

  GtkPaned::handle_size = 6

  GtkRange::slider_width = 20
  GtkRange::stepper_size = 10
  GtkScrollbar::min_slider_length = 30
  GtkCheckButton::indicator_size = 12
  GtkMenuBar::internal-padding = 0

  #GtkOptionMenu::indicator_size = { 11, 6 }
  #GtkOptionMenu::indicator_spacing = { 4, 5, 2, 2 }

  GtkTreeView::expander_size = 14
  GtkExpander::expander_size = 16

  xthickness = 1
  ythickness = 1

  # Set the background,foreground, text, and base colours
  #[NORMAL]		= "#009900"	# The normal colour.
  #[PRELIGHT]		= "#00c300"	# "On hover".
  #[ACTIVE]		= "#00ed00"	# When a button is pressed.
  #[INSENSITIVE]	= "#008000"	# Disabled widget.
  #[SELECTED]		= "#00ff00"	# When text is selected.

  bg[NORMAL] = "grey20"		#window frame color
  bg[PRELIGHT] = "grey40"	#icon hover  
  bg[ACTIVE] = "grey40"		#inactive tab color  
  bg[INSENSITIVE] = "grey40"	#disabled button color
  bg[SELECTED] = "grey40"	#menu highlight

  
  fg[NORMAL] = "white"		#frame-menu text color
  fg[PRELIGHT] = "white"	#frame-menu hover txt color
  fg[ACTIVE] = "white"		#inactive tab txt
  fg[INSENSITIVE] = "grey40"	#disabled text color
  fg[SELECTED] = "white"	#address bar select txt
  
  
  base[NORMAL] = "black"	#app background
  base[PRELIGHT] = "red"
  base[ACTIVE] = "grey40"	#frame-menu highlight color
  base[INSENSITIVE] = "grey40"	#disabled dialogue box
  base[SELECTED] = "grey40"	#txt highlight
  

  text[NORMAL] = "white"	#app window txt
  text[PRELIGHT] = "white"
  text[ACTIVE] = "white"	#unslected files in dialogue
  text[INSENSITIVE] = "grey40" 	#disabled drop down box color
  text[SELECTED] = "white"	#selected txt and files
  

  engine "clearlooks" 
  {
    contrast = 1.0
    colorize_scrollbar = TRUE
    reliefstyle = 1
    menubarstyle=1		# 0 = flat, 1 = sunken, 2 = flat gradient #sunkenmenubar = 1
    toolbarstyle = 1
    animation = FALSE
    radius = 3.0
  }
}



style "clearlooks-wide" = "clearlooks-default"
{
  xthickness = 2
  ythickness = 2
}

style "clearlooks-notebook" = "clearlooks-wide"
{
  bg[ACTIVE] = "grey40"		#inactive tab color settings window
  bg[NORMAL] = "grey50" 	#active tab color
}

style "clearlooks-notebook-title" = "clearlooks-default"
{
  fg[ACTIVE] = "white"		#inactive tab txt settings window
}

style "clearlooks-check-button" = "clearlooks-default"
{
  fg[ACTIVE] = "white"  	#radio button txt
  fg[NORMAL] = "white"		#inactive rad button txt

}

style "clearlooks-tasklist" = "clearlooks-default"
{
  xthickness = 5
  ythickness = 3
}

style "clearlooks-menu" = "clearlooks-default"
{
  xthickness = 2
  ythickness = 1
}

style "clearlooks-menu-item" = "clearlooks-default"
{
  xthickness = 2
  ythickness = 3
}

style "clearlooks-menu-itembar" = "clearlooks-default"
{
  xthickness = 3
  ythickness = 3
}

style "clearlooks-tree" = "clearlooks-default"
{
  xthickness = 2
  ythickness = 2
}

style "clearlooks-frame-title" = "clearlooks-default"
{
  fg[NORMAL] = "white" #settings window txt color
}

style "clearlooks-panel" = "clearlooks-default"
{
  xthickness = 3
  ythickness = 3
}

style "clearlooks-tooltips" = "clearlooks-default"
{
  xthickness = 4
  ythickness = 4
  bg[NORMAL] = "black"
  fg[NORMAL] = "white"
}

style "clearlooks-progressbar"	= "clearlooks-default"
{
  xthickness = 0
  ythickness = 0

  bg[NORMAL] = "grey40"			#download bar bkgnd
  fg[NORMAL] = "white"			#download bar txt

 
  
}

style "clearlooks-combo" = "clearlooks-default"
{
  xthickness = 1
  ythickness = 2
}
 
  


Reply

Tags
crux, gradient, gtk, menu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Atolm GTK Theme + Clarity Icon Theme = Perfect for Dark Theme Fans LXer Syndicated Linux News 0 02-26-2011 11:50 PM
LXer: Atolm - Impressive New Theme by the Artists Behind Orta GTK Theme LXer Syndicated Linux News 1 12-30-2010 02:17 PM
LXer: Equinox GTK Theme + Faenza Icon Theme = Pure Awesomeness! LXer Syndicated Linux News 0 08-11-2010 02:41 AM
/History/ of Crux theme? introuble General 0 04-07-2008 12:14 PM
kde / gtk cursor-theme / theme issue - gentoo imperfect Linux - Newbie 1 01-08-2006 05:09 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration