More Mac integration works - now it is able to load and use GTK+

themes. Configuration interface on ToDo.

This also indicates that URTrator is now able to perform basic
window theming.
This commit is contained in:
Stanislav Nikitin 2016-10-10 19:16:51 +05:00
parent 25dfa5072b
commit 2784586f8d
19 changed files with 1650 additions and 14 deletions

View File

@ -12,9 +12,19 @@ brew install go
* Install GTK+2:
```
brew install gtk+
brew install gtk+ --with-quartz-relocation
```
*Note: default GTK+2 build from Brew might not work for you!*
* Reinstall gdk-pixbuf with additional option:
```
brew install --with-relocations
```
*Note: default build might not work for you!*
* Install dylibbundler:
```
@ -23,3 +33,13 @@ brew install dylibbundler
* Execute ``make-app.sh`` script from current directory. If everything
went fine - you will see URTrator.app right in this directory.
# Some descriptions
## Resources
This directory will be copied inside bundle. It contains resources needed
for proper working or/and launching.
Of course, it *might* be able to work without this directory, but it will
be superugly.

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

View File

@ -0,0 +1,498 @@
# Author: perfectska04 (Victor C.)
# Theme: Clearlooks-Colors for Ubuntu Hardy/Gnome 2.22 or equivalent.
# Description: Clearlooks-Colors is 100% free and open source.
# NOTE: Uncommenting means to delete the "#" at the beginning of a line. Commenting means to add a "#" at the beginning of a line. The "#" tells the theme wether to ignore the specified line or not.
# These are the defined colors for the theme, you can change them in GNOME's appearance preferences.
gtk_color_scheme = "fg_color:#101010\nbg_color:#EBEBEB\nbase_color:#fff\ntext_color:#1A1A1A\nselected_bg_color:#729FCF\nselected_fg_color:#1A1A1A\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000"
#########
# ICONS
#########
gtk-icon-sizes = "gtk-button=16,16" # This makes button icons smaller.
#gtk-icon-sizes = "gtk-large-toolbar=16,16:gtk-small-toolbar=16,16:panel-menu=16,16:gtk-button=16,16" # This enables "compact-mode".
#gtk-button-images = 0 # Enables or disables icons on buttons (OS X-like).
#gtk-menu-popup-delay = 1 # Makes menus pop up faster! Set to 1 instead of 0 to avoid Banshee 1 bug.
##########
# PANELS
##########
include "./panel.rc" # This includes the file that handles panel theming. Gradient panel backgrounds are enabled by default for this setting. Please edit panel.rc if you don't want gradient backgrounds in your panels, or plan to use transparent/custom panels.
# The following lines make panel-menu-applet and gimmie applet's text bold.
style "bold-panel-menu"
{
font_name = "Bold"
}
widget "*Panel*slab-main-menu-panel-button*" style "bold-panel-menu"
widget "*Panel*MenuBar*" style "bold-panel-menu"
widget "*gimmie*" style "bold-panel-menu"
##########################
# GENERAL THEME SETTINGS
##########################
style "clearlooks-default"
{
GtkButton ::child-displacement-x = 0 # Pressed button icon displacement.
GtkButton ::child-displacement-y = 1 # Pressed button icon displacement.
GtkButton ::default-border = { 0, 0, 0, 0 }
GtkCheckButton ::indicator-size = 14 # Size for check buttons.
GtkRadioButton ::indicator-size = 14 # Size for radio buttons.
GtkPaned ::handle-size = 6 # Width of handles.
GtkRange ::trough-border = 0
GtkRange ::slider-width = 15
GtkRange ::stepper-size = 15
GtkScale ::slider-length = 24 # Length of sliders.
GtkScale ::trough-side-details = 1
GtkScrollbar ::min-slider-length = 30 # Min. length of scrollbars.
GtkMenuBar ::internal-padding = 0
GtkExpander ::expander-size = 16
GtkToolbar ::internal-padding = 1 # Toolbar padding.
GtkTreeView ::expander-size = 14
GtkTreeView ::vertical-separator = 0
GtkMenu ::horizontal-padding = 0
GtkMenu ::vertical-padding = 0
WnckTasklist ::fade-overlay-rect = 0
# GtkButton ::focus-padding = 0 # This can give you a more compact appearance.
GtkScrolledWindow ::scrollbar-spacing = 2 # This sets the spacing between scrollbars.
GtkTreeView::odd_row_color = mix(0.98, shade (0.93,@base_color), @selected_bg_color) # This sets the color for odd row items.
GtkEntry::honors-transparent-bg-hint = 1
# Uncomment one or both of the following for flat/unified menus or toolbars:
# GtkToolbar ::shadow-type = GTK_SHADOW_NONE # Makes toolbars flat and unified.
# GtkMenuBar ::shadow-type = GTK_SHADOW_NONE # Makes menus flat and unified.
xthickness = 1
ythickness = 1
fg[NORMAL] = @fg_color
fg[PRELIGHT] = @fg_color
fg[SELECTED] = @selected_fg_color
fg[ACTIVE] = @fg_color
fg[INSENSITIVE] = darker (@bg_color)
bg[NORMAL] = @bg_color
bg[PRELIGHT] = shade (1.02, @bg_color)
bg[SELECTED] = @selected_bg_color # Color for selected items.
bg[INSENSITIVE] = @bg_color
bg[ACTIVE] = shade (0.90, @bg_color)
base[NORMAL] = @base_color
base[PRELIGHT] = shade (0.95, @bg_color)
base[ACTIVE] = shade (0.90, @bg_color)
base[SELECTED] = shade (1.25, @selected_bg_color) # Color for selected base items.
base[INSENSITIVE] = @bg_color
text[NORMAL] = @text_color
text[PRELIGHT] = @text_color
text[ACTIVE] = @selected_fg_color
text[SELECTED] = @selected_fg_color
text[INSENSITIVE] = darker (@bg_color)
engine "clearlooks"
{
reliefstyle = 1 # 0 makes buttons/widgets less raised.
menubarstyle = 2 # Gradient menubar, use tweak in line 66 for flat menubars.
toolbarstyle = 0 # 0 makes bad toolbars flat.
animation = TRUE # FALSE disables progressbar animations.
style = GUMMY # Could also be set to GLOSSY.
radius = 2.0 # Roundness of widgets.
hint = "use-hints" # Set a hint to disable backward compatibility fallbacks.
}
}
#################
# THEME MODULES
#################
style "evolution-hack" = "clearlooks-default" # Hacks for Evolution Mail.
{
bg[NORMAL] = shade (1.04, @bg_color) # Color for evo treeview headers.
bg[PRELIGHT] = shade (1.08, @bg_color) # Color for evo treeview header prelight.
bg[ACTIVE] = shade (0.90, @bg_color) # Color for unfocused evo selected items.
bg[SELECTED] = shade (1.25, @selected_bg_color) # Color for evo selected items.
fg[ACTIVE] = @selected_fg_color # Color for evo active text.
fg[SELECTED] = @selected_fg_color # Color for evo selected text.
}
style "clearlooks-wide"
{
xthickness = 2 # Can't change, or clowns will eat you.
ythickness = 2 # Can't change, or clowns will eat you.
}
style "clearlooks-wider"
{
xthickness = 3 # Can't change, or clowns will eat you.
ythickness = 3 # Can't change, or clowns will eat you.
}
style "clearlooks-button" = "clearlooks-wider"
{
bg[NORMAL] = shade (1.04, @bg_color) # Color for buttons.
bg[PRELIGHT] = shade (1.08, @bg_color) # Color for button-prelight.
bg[ACTIVE] = shade (0.85, @bg_color) # Color for pressed-buttons.
}
style "clearlooks-notebook-bg"
{
bg[NORMAL] = shade (1.04, @bg_color) # Tab background.
bg[ACTIVE] = shade (0.94, @bg_color) # Unfocused tab background.
}
style "clearlooks-notebook" = "clearlooks-notebook-bg"
{
xthickness = 3 # Width of tabs and notebook borders.
ythickness = 3 # Height of tabs and notebook borders.
}
style "clearlooks-menu" = "clearlooks-wider"
{
bg[NORMAL] = shade (1.05, @bg_color) # Color of menu background.
engine "clearlooks"
{
radius = 1.0 # Roundness of menu items.
}
}
style "clearlooks-menu-item" = "clearlooks-wider"
{
fg[PRELIGHT] = @selected_fg_color # Color of selected menu item text.
bg[SELECTED] = shade (1.25, @selected_bg_color) # Color of menu items.
bg[PRELIGHT] = shade (1.25, @selected_bg_color) # Color of menu items.
}
style "clearlooks-separator-menu-item"
{
xthickness = 1
ythickness = 2
# Code for pixmap menu separators.
engine "pixmap"
{
image
{
function = HLINE
recolorable = TRUE
file = "Menu-Menubar/menu-line.png"
border = { 1, 1, 1, 1 }
stretch = TRUE
}
}
}
style "clearlooks-menubar"
{
engine "clearlooks"
{
hint = "menubar"
}
}
style "clearlooks-treeview"
{
bg[SELECTED] = shade (1.25, @selected_bg_color) # Color workaround for Banshee 1.0.
engine "clearlooks"
{
hint = "treeview"
radius = 0.0 # This makes treeview progressbars square.
}
}
style "clearlooks-treeview-header" = "clearlooks-default"
{
xthickness = 2
ythickness = 1
bg[NORMAL] = shade (1.04, @bg_color) # Color for treeview headers.
bg[PRELIGHT] = shade (1.08, @bg_color) # Color for treeview header prelight.
bg[ACTIVE] = shade (0.85, @bg_color) # Color for pressed-treeview.
engine "clearlooks" {
hint = "treeview-header"
}
}
style "clearlooks-frame-title"
{
fg[NORMAL] = lighter (@fg_color)
}
style "clearlooks-tooltips" = "clearlooks-wider"
{
bg[NORMAL] = @tooltip_bg_color
fg[NORMAL] = @tooltip_fg_color
}
style "metacity-frame" = "clearlooks-default"
{
# bg[SELECTED] = @selected_bg_color # Color for metacity borders.
}
style "clearlooks-progressbar"
{
xthickness = 1
ythickness = 1
fg[PRELIGHT] = @base_color # Progressbar prelighted text.
engine "clearlooks"
{
radius = 1.0 # Roundness of progressbars.
hint = "progressbar"
}
}
style "clearlooks-statusbar"
{
engine "clearlooks"
{
hint = "statusbar"
}
}
style "clearlooks-comboboxentry"
{
engine "clearlooks"
{
hint = "comboboxentry"
}
}
style "clearlooks-spinbutton"
{
bg[NORMAL] = shade (1.04, @bg_color) # Color for spinbuttons.
bg[PRELIGHT] = shade (1.08, @bg_color) # Color for spinbutton prelight.
bg[ACTIVE] = shade (0.85, @bg_color) # Color for pressed-spinbuttons.
engine "clearlooks"
{
hint = "spinbutton"
}
}
style "clearlooks-scale" = "clearlooks-button"
{
bg[NORMAL] = shade (1.04, @bg_color) # Color for sliders.
bg[PRELIGHT] = shade (1.08, @bg_color) # Color for slider prelight.
bg[ACTIVE] = shade (0.85, @bg_color) # Color for pressed-sliders.
engine "clearlooks"
{
hint = "scale"
}
}
style "clearlooks-hscale" = "clearlooks-scale"
{
engine "clearlooks"
{
hint = "hscale"
}
}
style "clearlooks-vscale" = "clearlooks-scale"
{
engine "clearlooks"
{
hint = "vscale"
}
}
style "clearlooks-nautilus-location" # Workaround for nautilus' messages.
{
bg[NORMAL] = shade (1.25, @selected_bg_color)
}
style "clearlooks-radiocheck" = "clearlooks-default"
{
# text[NORMAL] = shade (0.9, @selected_bg_color) # Color for checks/radio items.
# bg[SELECTED] = lighter (@selected_bg_color) # Color for prelight of check/radio buttons.
}
##############
# SCROLLBARS
##############
style "clearlooks-scrollbar"
{
bg[NORMAL] = shade (1.04, @bg_color) # Color for non-colored scrollbars.
bg[PRELIGHT] = shade (1.08, @bg_color) # Color for scrollbar prelight? (probably obsolete)
bg[ACTIVE] = shade (0.85, @bg_color) # Color for pressed scrollbar buttons.
# bg[SELECTED] = @selected_bg_color # You can change the color of colorized scrollbars here.
engine "clearlooks"
{
# colorize_scrollbar = TRUE # Uncommenting this gives you colorful scrollbars.
radius = 1.0 # Roundness of scrollbars.
hint = "scrollbar"
}
}
style "clearlooks-hscrollbar" = "clearlooks-scrollbar"
{
engine "clearlooks"
{
hint = "hscrollbar"
}
}
style "clearlooks-vscrollbar" = "clearlooks-scrollbar"
{
engine "clearlooks"
{
hint = "vscrollbar"
}
}
############
# TOOLBARS
############
#Gradient toolbars are enabled for this theme.
style "clearlooks-toolbar" = "clearlooks-default"
{
bg[NORMAL] = shade (0.965, @bg_color) # Darkens gradient toolbars to match with unified metacity theme.
engine "clearlooks"
{
toolbarstyle = 1 # This forces gradient toolbars.
}
}
style "clearlooks-evo-new-button-workaround"
{
bg[NORMAL] = shade (0.965, @bg_color)
engine "clearlooks"
{
toolbarstyle = 0
}
}
widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "clearlooks-evo-new-button-workaround"
class "GtkHandleBox" style "clearlooks-toolbar"
#########################################
# Matches
#########################################
# Clearlooks default style is applied to every widget.
class "GtkWidget" style "clearlooks-default"
# Increase the x/ythickness in some widgets.
class "GtkToolbar" style "clearlooks-toolbar"
class "GtkFrame" style "clearlooks-wide"
class "GtkEntry" style "clearlooks-wider"
class "MetaFrames" style "metacity-frame"
class "GtkSeparator" style "clearlooks-wide"
class "GtkWindow" style "metacity-frame"
class "GtkCalendar" style "clearlooks-wide"
class "GtkSpinButton" style "clearlooks-spinbutton"
class "GtkScale" style "clearlooks-scale"
class "GtkVScale" style "clearlooks-vscale"
class "GtkHScale" style "clearlooks-hscale"
class "GtkScrollbar" style "clearlooks-scrollbar"
class "GtkVScrollbar" style "clearlooks-vscrollbar"
class "GtkHScrollbar" style "clearlooks-hscrollbar"
class "GtkRadio*" style "clearlooks-radiocheck"
class "GtkCheck*" style "clearlooks-radiocheck"
# General matching following, the order is choosen so that the right styles override each other eg. progressbar needs to be more important then the menu match.
# This is not perfect, it could be done better (That is modify *every* widget in the notebook, and change those back that we really don't want changed)
widget_class "*<GtkNotebook>*<GtkEventBox>" style "clearlooks-notebook-bg"
widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "clearlooks-notebook-bg"
widget_class "*<GtkNotebook>*<GtkLayout>" style "clearlooks-notebook-bg"
widget_class "*.GtkNotebook.*.GtkViewport" style "clearlooks-notebook"
widget_class "*<GtkButton>" style "clearlooks-button"
widget_class "*<GtkNotebook>" style "clearlooks-notebook"
widget_class "*<GtkStatusbar>*" style "clearlooks-statusbar"
widget_class "*<GtkComboBoxEntry>*" style "clearlooks-comboboxentry"
widget_class "*<GtkCombo>*" style "clearlooks-comboboxentry"
widget_class "*<GtkMenuBar>*" style "clearlooks-menubar"
widget_class "*<GtkMenu>*" style "clearlooks-menu"
widget_class "*<GtkMenuItem>*" style "clearlooks-menu-item"
widget_class "*<GtkSeparatorMenuItem>*" style "clearlooks-separator-menu-item"
widget_class "*.<GtkFrame>.<GtkLabel>" style "clearlooks-frame-title"
widget_class "*.<GtkTreeView>*" style "clearlooks-treeview"
widget_class "*<GtkProgressBar>" style "clearlooks-progressbar"
# Treeview header
widget_class "*.<GtkTreeView>.<GtkButton>" style "clearlooks-treeview-header"
widget_class "*.<GtkCTree>.<GtkButton>" style "clearlooks-treeview-header"
widget_class "*.<GtkList>.<GtkButton>" style "clearlooks-treeview-header"
widget_class "*.<GtkCList>.<GtkButton>" style "clearlooks-treeview-header"
# Workarounds for Evolution
widget_class "*.ETable.ECanvas" style "clearlooks-treeview-header"
widget_class "*.ETree.ECanvas" style "clearlooks-treeview-header"
widget_class "*GtkCTree*" style "evolution-hack"
widget_class "*GtkList*" style "evolution-hack"
widget_class "*GtkCList*" style "evolution-hack"
widget_class "*.ETree.*" style "evolution-hack"
widget_class "*EInfoLabel*" style "evolution-hack"
# 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 "clearlooks-tooltips"
###################################################
# SPECIAL CASES AND WORKAROUNDS
###################################################
# Special case the nautilus-extra-view-widget
# ToDo: A more generic approach for all applications that have a widget like this.
widget "*.nautilus-extra-view-widget" style : highest "clearlooks-nautilus-location"
# 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 "clearlooks-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 "clearlooks-text-is-fg-color-workaround"
style "clearlooks-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 "clearlooks-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 "clearlooks-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 "clearlooks-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 "clearlooks-fg-is-text-color-workaround"
widget_class "*<EelEditableLabel>" style "clearlooks-fg-is-text-color-workaround"
# The answer to the ultimate question of life, the universe, and everything is 42.

View File

@ -0,0 +1,53 @@
################################################
# PANELS
################################################
# Note: Uncommenting means to delete the "#" at the beginning of a line. Commenting out means to add a "#" at the beginning of a line. The "#" tells the theme wether to ignore the line or not.
style "theme-panel"
{
# The following two lines add gradient panel backgrounds. You may choose only one! Delete or comment out both to have regular, flat gnome-panels.
bg_pixmap[NORMAL] = "/Panels/panel-bg.png" # Light gradient panel.
#bg_pixmap[NORMAL] = "/Panels/panel-bg-dark.png" # Dark gradient panel.
# Uncomment the following lines when using dark panels! Note: Menus will remain the same.
# bg[SELECTED] = "#525252" # Makes selected items dark.
# bg[NORMAL] = "#3c3c3c" # Makes panel background dark.
# bg[PRELIGHT] = "#424242" # Makes panel button prelight dark.
# bg[ACTIVE] = "#333333" # Makes active buttons dark.
# bg[INSENSITIVE] = "#3C3C3C"
# fg[NORMAL] = "#D4D4D4" # Makes panel text light.
# fg[PRELIGHT] = lighter (@selected_bg_color) # Makes prelighted text colored.
# fg[SELECTED] = lighter (@selected_bg_color) # Makes prelighted text colored.
# fg[ACTIVE] = lighter (@selected_bg_color) # Makes active text colored.
# fg[INSENSITIVE] = "#666666" # Color for insensitive text.
# text[NORMAL] = @text_color
# text[PRELIGHT] = lighter (@selected_bg_color) # Makes prelighted text colored.
# text[SELECTED] = lighter (@selected_bg_color) # Makes prelighted text colored.
# text[ACTIVE] = lighter (@selected_bg_color) # Makes active text colored.
# text[INSENSITIVE] = "#666666"
}
# Panel settings. Do not change.
widget "*PanelWidget*" style "theme-panel"
widget "*PanelApplet*" style "theme-panel"
widget "*fast-user-switch*" style "theme-panel"
widget "*CPUFreq*Applet*" style "theme-panel"
widget "*indicator-applet*" style "theme-panel"
class "PanelApp*" style "theme-panel"
class "PanelToplevel*" style "theme-panel"
widget_class "*PanelToplevel*" style "theme-panel"
widget_class "*Mail*" style "theme-panel"
#class "*Panel*" style "theme-panel" # Disabled to fix bug.
widget_class "*notif*" style "theme-panel"
widget_class "*Notif*" style "theme-panel"
widget_class "*Tray*" style "theme-panel"
widget_class "*tray*" style "theme-panel"
widget_class "*Applet*Tomboy*" style "theme-panel"
widget_class "*Applet*Netstatus*" style "theme-panel"
# XFCE panel theming.
widget "*Xfce*Panel*" style "theme-panel"
class "*Xfce*Panel*" style "theme-panel"

View File

@ -0,0 +1,6 @@
[X-GNOME-Metatheme]
Name=Clearlooks Brave
Encoding=UTF-8
GtkTheme=Clearlooks Brave
MetacityTheme=Clearlooks-Colors Metacity
IconTheme=gnome-brave

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

View File

@ -0,0 +1,799 @@
#OS X El Capitan v0.6
gtk-color-scheme = "bg_color:#e4e4e4\nfg_color:#4c4c4c\nbase_color:#fff\ntext_color:#4c4c4c\nselected_bg_color:#116cd6\nselected_fg_color:#ffffff\ntooltip_bg_color:#fff\ntooltip_fg_color:#4c4c4c\ntitlebar_bg_color:#e4e4e4\ntitlebar_fg_color:#4c4c4c\nmenubar_bg_color:#e4e4e4\nmenubar_fg_color:#4c4c4c\ntoolbar_bg_color:#e4e4e4\ntoolbar_fg_color:#4c4c4c\nmenu_bg_color:#F5F5F5\nmenu_fg_color:#4c4c4c\npanel_bg_color:#F5F5F5\npanel_fg_color:#4c4c4c\nlink_color:#D1EDFE"
# Default Style
style "murrine-default" {
GtkArrow::arrow-scaling= 0.6
GtkButton::child-displacement-x = 0
GtkButton::child-displacement-y = 0
GtkButton::default-border = { 0, 0, 0, 0 }
GtkButtonBox::child-min-height = 26
GtkCheckButton::indicator-size = 16
# The following line hints to gecko (and possibly other appliations)
# that the entry should be drawn transparently on the canvas.
# Without this, gecko will fill in the background of the entry.
GtkEntry::honors-transparent-bg-hint = 1
GtkEntry::state-hint = 0
GtkExpander::expander-size = 16
GtkImage::x-ayatana-indicator-dynamic = 1
GtkMenu::horizontal-padding = 0
GtkMenu::vertical-padding = 0
GtkMenuBar::internal-padding = 0
GtkMenuBar::window-dragging = 1
GtkMenuItem::arrow-scaling= 0.5
GtkPaned::handle-size = 1
GtkProgressBar::min-horizontal-bar-height = 4
GtkProgressBar::min-vertical-bar-width = 4
GtkRange::trough-border = 0
GtkRange::slider-width = 12
GtkRange::stepper-size = 12
GtkRange::stepper_spacing = 0
GtkRange::trough-under-steppers = 1
GtkScale::slider-length = 16
GtkScale::slider-width = 16
GtkScale::trough-side-details = 1
GtkScrollbar::activate-slider = 1
GtkScrollbar::has-backward-stepper = 0
GtkScrollbar::has-forward-stepper = 0
GtkScrollbar::has-secondary-backward-stepper = 0
GtkScrollbar::has-secondary-forward-stepper = 0
GtkScrollbar::min-slider-length = 80
GtkScrollbar::slider-width = 6
GtkScrollbar::trough-border = 3
GtkScrolledWindow::scrollbar-spacing = 0
GtkScrolledWindow::scrollbars-within-bevel = 1
GtkSeparatorMenuItem::horizontal-padding = 0
GtkToolbar::internal-padding = 0
GtkTreeView::expander-size = 11
GtkTreeView::vertical-separator = 0
GtkWidget::focus-line-width = 1
# The following line prevents the Firefox tabs
# from jumping a few pixels when you create a new tab
GtkWidget::focus-padding = 0
GtkWidget::wide-separators = 1
GtkWidget::separator-width = 1
GtkWidget::separator-height = 1
GtkWindow::resize-grip-height = 0
GtkWindow::resize-grip-width = 0
WnckTasklist::fade-overlay-rect = 0
GnomeHRef::link_color = @link_color
GtkHTML::link-color = @link_color
GtkIMHtmlr::hyperlink-color = @link_color
GtkIMHtml::hyperlink-color = @link_color
GtkWidget::link-color = @link_color
GtkWidget::visited-link-color = @text_color
GtkToolbar::shadow-type = GTK_SHADOW_NONE # Makes toolbars flat and unified
GtkMenuBar::shadow-type = GTK_SHADOW_NONE # Makes menubars flat and unified
xthickness = 1
ythickness = 1
fg[NORMAL] = @fg_color
fg[PRELIGHT] = @fg_color
fg[SELECTED] = @selected_fg_color
fg[ACTIVE] = @fg_color
fg[INSENSITIVE] = mix (0.5, @bg_color, @fg_color)
bg[NORMAL] = @bg_color
bg[PRELIGHT] = shade (1.02, @bg_color)
bg[SELECTED] = @selected_bg_color
bg[ACTIVE] = shade (0.9, @bg_color)
bg[INSENSITIVE] = @bg_color
base[NORMAL] = @base_color
base[PRELIGHT] = shade (0.95, @base_color)
base[SELECTED] = @selected_bg_color
base[ACTIVE] = @selected_bg_color
base[INSENSITIVE] = shade (0.85, @base_color)
text[NORMAL] = @text_color
text[PRELIGHT] = @text_color
text[SELECTED] = @selected_fg_color
text[ACTIVE] = @selected_fg_color
text[INSENSITIVE] = mix (0.5, @base_color, @text_color)
engine "murrine" {
animation = TRUE
arrowstyle = 1 # 0 = normal arrows, 1 = filled arrows
border_shades = { 1.0, 1.0 } # gradient to draw on border
colorize_scrollbar = FALSE
comboboxstyle = 0 # 0 = normal combobox, 1 = colorized combobox below arrow
contrast = 0.8 # overal contrast with borders
default_button_color = @selected_bg_color
focusstyle = 3 # 0 = none, 1 = grey dotted, 2 = colored with fill, 3 = colored glow
glazestyle = 0 # 0 = flat highlight, 1 = curved highlight, 2 = concave, 3 = top curved highlight, 4 = beryl highlight
glowstyle = 0 # 0 = glow on top, 1 = glow on bottom, 2 = glow on top and bottom, 3 = glow on middle vertically, 4 = glow on middle horizontally, 5 = glow on all sides
glow_shade = 1.0 # amount of glow
gradient_shades = { 1.0, 1.0, 1.0, 1.0 } # gradient to draw on widgets
highlight_shade = 1.0 # amount of highlight
lightborder_shade = 1.0 # amount of inset light border
lightborderstyle = 1 # 0 = lightborder on top side, 1 = lightborder on all sides
listviewheaderstyle = 0 # 0 = flat, 1 = glassy, 2 = raised
listviewstyle = 0 # 0 = none, 1 = dotted, 2 = line
menubaritemstyle = 0 # 0 = menuitem look, 1 = button look
menubarstyle = 0 # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
menuitemstyle = 0 # 0 = flat, 1 = glassy, 2 = striped
menustyle = 0 # 0 = none, 1 = vertical striped
progressbarstyle = 0 # 0 = none, 1 = diagonal striped, 2 = vertical striped
reliefstyle = 0 # 0 = flat, 1 = inset, 2 = shadow, 3 = shadow with gradient, 4 = stronger shadow with gradient
roundness = 1 # roundness of widgets
scrollbarstyle = 0 # 0 = none, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles
sliderstyle = 0 # 0 = none, 1 = handles
stepperstyle = 1 # 0 = standard, 1 = integrated stepper handles
toolbarstyle = 0 # 0 = flat, 1 = glassy, 2 = gradient
}
}
style "murrine-wide" {
xthickness = 2
ythickness = 2
}
style "murrine-wider" {
xthickness = 3
ythickness = 3
}
style "murrine-thin" {
xthickness = 0
ythickness = 0
}
# Notebook
style "murrine-notebook-bg" {
bg[NORMAL] = @bg_color
bg[ACTIVE] = shade (0.9, @bg_color)
}
style "murrine-notebook" = "murrine-notebook-bg" {
xthickness = 2
ythickness = 2
engine "murrine" {
roundness = 6
gradient_shades = {1.1,1.0,1.0,0.9}
}
}
# Various Standard Widgets
style "murrine-button" = "murrine-wider" {
bg[NORMAL] = shade (1.1, @bg_color)
bg[PRELIGHT] = @bg_color
bg[ACTIVE] = @selected_bg_color
bg[INSENSITIVE] = shade (0.85, @bg_color)
engine "murrine" {
contrast = .8
lightborder_shade = 1.9
roundness = 4
border_shades = {0.95, 0.8}
shadow_shades = {1.0, 0.1}
gradient_shades = {1.1,1.0,1.0,0.9}
}
}
style "murrine-scrollbar" {
bg[NORMAL] = mix (0.21, @fg_color, @bg_color)
bg[PRELIGHT] = mix (0.31, @fg_color, @bg_color)
bg[ACTIVE] = shade (0.8, @bg_color)
engine "murrine" {
roundness = 6
contrast = 0.0
border_shades = { 1.0, 1.0 }
trough_shades = { 1.0, 1.0 }
trough_border_shades = { 1.0, 1.0 }
}
}
style "murrine-overlay-scrollbar" {
bg[ACTIVE] = shade (0.8, @bg_color)
bg[INSENSITIVE] = shade (0.97, @bg_color)
base[SELECTED] = shade (0.6, @base_color)
base[INSENSITIVE] = shade (0.85, @base_color)
}
style "murrine-scale" = "murrine-thin" {
bg[NORMAL] = @bg_color
bg[ACTIVE] = @bg_color
bg[SELECTED] = @selected_bg_color
bg[INSENSITIVE] = shade (0.95, @bg_color)
engine "murrine" {
roundness = 6
gradient_shades = { 1.08, 1.08, 1.08, 1.08 }
border_shades = { 1.0, 1.0 }
trough_shades = { 1.08, 1.08 }
trough_border_shades = { 0.8, 0.8 }
}
}
style "murrine-progressbar" = "murrine-thin" {
bg[NORMAL] = @bg_color
bg[ACTIVE] = shade (1.08, @bg_color)
fg[PRELIGHT] = @selected_fg_color
engine "murrine" {
roundness = 8
border_shades = { 1.2, 1.2 }
trough_border_shades = { 0.8, 0.8 }
}
}
style "murrine-treeview-header" = "murrine-button" {
engine "murrine" {
roundness = 0
}
}
style "murrine-treeview" {
engine "murrine" {
roundness = 0
}
}
style "murrine-frame-title" {
fg[NORMAL] = lighter (@fg_color)
}
style "murrine-tooltips" {
xthickness = 5
ythickness = 5
bg[NORMAL] = @tooltip_bg_color
bg[SELECTED] = @tooltip_bg_color
fg[NORMAL] = @tooltip_fg_color
engine "murrine" {
textstyle = 0
roundness = 2
rgba = FALSE
}
}
style "murrine-spinbutton" = "murrine-button" {
engine "murrine" {
}
}
style "murrine-radiocheck" = "murrine-default" {
bg[NORMAL] = @base_color
bg[SELECTED] = @selected_bg_color
text[NORMAL] = @base_color
text[PRELIGHT] = @base_color
engine "murrine" {
reliefstyle = 0
gradient_shades = {1.2, 1.0, 1.0, 0.9}
shadow_shades = {0.6, 0.5}
textstyle = 0
}
}
style "murrine-entry" = "murrine-wider" {
engine "murrine" {
roundness = 6
border_shades = { 1.15, 1.15 }
}
}
style "metacity-frame" = "murrine-default" {
bg[SELECTED] = @selected_bg_color
}
style "murrine-statusbar" { }
style "murrine-comboboxentry" = "murrine-entry" { }
style "murrine-hscale" = "murrine-scale" { }
style "murrine-vscale" = "murrine-scale" { }
style "murrine-hscrollbar" = "murrine-scrollbar" { }
style "murrine-vscrollbar" = "murrine-scrollbar" { }
# Menus
style "murrine-menu" = "murrine-thin" {
bg[NORMAL] = @menu_bg_color
bg[PRELIGHT] = @selected_bg_color
bg[SELECTED] = @selected_bg_color
bg[ACTIVE] = @menu_bg_color
bg[INSENSITIVE] = @menu_bg_color
fg[NORMAL] = @menu_fg_color
fg[PRELIGHT] = @selected_fg_color
fg[SELECTED] = @selected_fg_color
fg[ACTIVE] = @selected_fg_color
fg[INSENSITIVE] = mix (0.5, @menu_bg_color, @menu_fg_color)
text[NORMAL] = @menu_fg_color
text[PRELIGHT] = @selected_fg_color
text[SELECTED] = @selected_fg_color
text[ACTIVE] = @selected_fg_color
text[INSENSITIVE] = mix (0.5, @menu_bg_color, @menu_fg_color)
engine "murrine" {
roundness = 0
}
}
style "murrine-menu-item" = "murrine-wider" {
bg[PRELIGHT] = @selected_bg_color
bg[SELECTED] = @selected_bg_color
bg[ACTIVE] = @selected_bg_color
fg[NORMAL] = @menu_fg_color # Fix for XFCE menu text
fg[PRELIGHT] = @selected_fg_color
fg[SELECTED] = @selected_fg_color
fg[ACTIVE] = @selected_fg_color
fg[INSENSITIVE] = mix (0.5, @menu_bg_color, @menu_fg_color)
engine "murrine" {
textstyle = 0
border_shades = { 1.2, 1.2 }
}
}
style "murrine-separator-menu-item" = "murrine-thin" { }
style "murrine-menubar" {
bg[NORMAL] = @menubar_bg_color
bg[PRELIGHT] = mix (0.21, @menubar_fg_color, @menubar_bg_color)
bg[SELECTED] = mix (0.21, @menubar_fg_color, @menubar_bg_color)
bg[ACTIVE] = shade (0.9, @menubar_bg_color)
bg[INSENSITIVE] = @menubar_bg_color
fg[NORMAL] = @menubar_fg_color
fg[PRELIGHT] = shade (1.08, @menubar_fg_color)
fg[SELECTED] = shade (1.08, @menubar_fg_color)
fg[ACTIVE] = @menubar_fg_color
fg[INSENSITIVE] = mix (0.5, @menubar_bg_color, @menubar_fg_color)
engine "murrine" {
roundness = 0
}
}
style "murrine-menubaritem" {
bg[NORMAL] = @menubar_bg_color
bg[PRELIGHT] = mix (0.21, @menubar_fg_color, @menubar_bg_color)
bg[SELECTED] = mix (0.21, @menubar_fg_color, @menubar_bg_color)
bg[ACTIVE] = shade (0.9, @menubar_bg_color)
bg[INSENSITIVE] = @menubar_bg_color
fg[NORMAL] = @menubar_fg_color
fg[PRELIGHT] = shade (1.08, @menubar_fg_color)
fg[SELECTED] = shade (1.08, @menubar_fg_color)
fg[ACTIVE] = @menubar_fg_color
fg[INSENSITIVE] = mix (0.5, @menubar_bg_color, @menubar_fg_color)
engine "murrine" {
roundness = 0
}
}
# Toolbars
style "murrine-toolbar" = "murrine-thin" {
bg[NORMAL] = @bg_color
bg[PRELIGHT] = shade (1.02, @bg_color)
bg[SELECTED] = @selected_bg_color
bg[ACTIVE] = shade (0.9, @bg_color)
bg[INSENSITIVE] = @bg_color
fg[NORMAL] = @fg_color
fg[PRELIGHT] = @fg_color
fg[SELECTED] = @selected_fg_color
fg[ACTIVE] = @fg_color
fg[INSENSITIVE] = mix (0.5, @bg_color, @fg_color)
engine "murrine" {
}
}
style "murrine-toolbutton" = "murrine-button" {
bg[NORMAL] = shade (1.08, @bg_color)
bg[PRELIGHT] = shade (1.10, @bg_color)
bg[SELECTED] = @bg_color
bg[ACTIVE] = shade (0.95, @bg_color)
bg[INSENSITIVE] = shade (0.85, @bg_color)
fg[NORMAL] = @fg_color
fg[PRELIGHT] = @fg_color
fg[SELECTED] = @fg_color
fg[ACTIVE] = @fg_color
fg[INSENSITIVE] = mix (0.5, @bg_color, @fg_color)
engine "murrine" {
roundness = 6
}
}
class "GtkToolbar" style "murrine-toolbar"
class "GtkHandleBox" style "murrine-toolbar"
widget_class "*Toolbar*.*Separator*" style "murrine-toolbar"
# Panels
style "murrine-panel" = "murrine-thin" {
xthickness = 2
bg[NORMAL] = @panel_bg_color
bg[PRELIGHT] = mix (0.21, @panel_fg_color, @panel_bg_color)
bg[SELECTED] = mix (0.21, @panel_fg_color, @panel_bg_color)
bg[ACTIVE] = shade (0.8, @panel_bg_color)
bg[INSENSITIVE] = @panel_bg_color
fg[NORMAL] = @panel_fg_color
fg[PRELIGHT] = shade (1.08, @panel_fg_color)
fg[SELECTED] = shade (1.08, @panel_fg_color)
fg[ACTIVE] = @panel_fg_color
fg[INSENSITIVE] = mix (0.5, @panel_bg_color, @panel_fg_color)
base[NORMAL] = @panel_bg_color
base[PRELIGHT] = mix (0.21, @panel_fg_color, @panel_bg_color)
base[SELECTED] = mix (0.21, @panel_fg_color, @panel_bg_color)
base[ACTIVE] = shade (0.9, @panel_bg_color)
base[INSENSITIVE] = @panel_bg_color
text[NORMAL] = @panel_fg_color
text[PRELIGHT] = shade (1.08, @panel_fg_color)
text[SELECTED] = shade (1.08, @panel_fg_color)
text[ACTIVE] = @panel_fg_color
text[INSENSITIVE] = mix (0.5, @panel_bg_color, @panel_fg_color)
engine "murrine" {
roundness = 0
contrast = 0.0
}
}
widget "*PanelWidget*" style "murrine-panel"
widget "*PanelApplet*" style "murrine-panel"
widget "*fast-user-switch*" style "murrine-panel"
widget "*CPUFreq*Applet*" style "murrine-panel"
widget "*indicator-applet*" style "murrine-panel"
class "PanelApp*" style "murrine-panel"
class "PanelToplevel*" style "murrine-panel"
widget_class "*PanelToplevel*" style "murrine-panel"
widget_class "*notif*" style "murrine-panel"
widget_class "*Notif*" style "murrine-panel"
widget_class "*Tray*" style "murrine-panel"
widget_class "*tray*" style "murrine-panel"
widget_class "*computertemp*" style "murrine-panel"
widget_class "*Applet*Tomboy*" style "murrine-panel"
widget_class "*Applet*Netstatus*" style "murrine-panel"
widget "*gdm-user-switch-menubar*" style "murrine-panel"
style "bold-panel-item" {
font_name = "Bold"
engine "murrine" {
roundness = 0
}
}
widget "*Panel*MenuBar*" style "bold-panel-item"
widget "*gimmie*" style "bold-panel-item"
# widget_class "*Mail*" style "murrine-panel" # Disabled to fix Evolution bug
# class "*Panel*" style "murrine-panel" # Disabled to fix bug
# XFCE Styles
style "workspace-switcher" = "murrine-panel" {
bg[SELECTED] = @selected_bg_color
}
style "xfce-header" {
bg[NORMAL] = shade (0.9, @bg_color)
base[NORMAL] = shade (1.18, @bg_color)
}
style "xfdesktop-windowlist" {
bg[NORMAL] = @base_color
fg[INSENSITIVE] = shade (0.95, @base_color)
text[INSENSITIVE] = shade (0.95, @base_color)
}
style "xfdesktop-icon-view" {
XfdesktopIconView::label-alpha = 0
XfdesktopIconView::selected-label-alpha = 60
XfdesktopIconVIew::ellipsize-icon-labels = 1
base[NORMAL] = @selected_bg_color
base[SELECTED] = @selected_bg_color
base[ACTIVE] = @selected_bg_color
fg[NORMAL] = @selected_fg_color
fg[SELECTED] = @selected_fg_color
fg[ACTIVE] = @selected_fg_color
engine "murrine" {
textstyle = 5
text_shade = 0.05
}
}
style "xfwm-tabwin" {
Xfwm4TabwinWidget::border-width = 0
Xfwm4TabwinWidget::icon-size = 64
bg[NORMAL] = @menu_bg_color
fg[NORMAL] = @menu_fg_color
engine "murrine" {
focusstyle = 0
}
}
style "xfsm-logout" {
bg[NORMAL] = @menu_bg_color
bg[ACTIVE] = @menu_bg_color
bg[PRELIGHT] = shade (1.1, @menu_bg_color)
bg[SELECTED] = shade (0.5, @menu_bg_color)
bg[INSENSITIVE] = shade (1.3, @menu_bg_color)
fg[NORMAL] = @menu_fg_color
fg[PRELIGHT] = @menu_fg_color
text[NORMAL] = @menu_fg_color
engine "murrine" {
}
}
style "xfsm-logout-button" {
bg[NORMAL] = shade (1.2, @menu_bg_color)
bg[PRELIGHT] = shade (1.4, @menu_bg_color)
engine "murrine" {
}
}
widget "*WnckPager*" style "workspace-switcher"
widget "*Xfce*Panel*" style "murrine-panel"
class "*Xfce*Panel*" style "murrine-panel"
# Thunar Styles
style "sidepane" {
base[NORMAL] = @bg_color
base[INSENSITIVE] = mix (0.4, shade (1.35, @selected_bg_color), shade (0.9, @base_color))
bg[NORMAL] = @bg_color
text[NORMAL] = mix (0.9, @fg_color, @bg_color)
}
widget_class "*ThunarShortcutsView*" style "sidepane"
widget_class "*ThunarTreeView*" style "sidepane"
widget_class "*ThunarLocationEntry*" style "murrine-entry"
# Gtk2 Open-File Dialog
widget_class "*GtkFileChooserWidget.GtkFileChooserDefault.GtkVBox.GtkHPaned.GtkVBox.GtkScrolledWindow.GtkTreeView*" style "sidepane"
widget_class "*GtkFileChooserWidget.GtkFileChooserDefault.GtkVBox.GtkHPaned.GtkVBox.GtkScrolledWindow.<GtkTreeView>.<GtkButton>" style "murrine-treeview-header"
# Google Chrome/Chromium Styles (requires 9.0.597 or newer)
style "chromium-toolbar-button" {
engine "murrine" {
roundness = 4
textstyle = 0
}
}
style "chrome-gtk-frame" {
ChromeGtkFrame::frame-color = @titlebar_bg_color
ChromeGtkFrame::inactive-frame-color = @titlebar_bg_color
ChromeGtkFrame::frame-gradient-size = 0
ChromeGtkFrame::frame-gradient-color = @titlebar_bg_color
ChromeGtkFrame::incognito-frame-color = @titlebar_bg_color
ChromeGtkFrame::incognito-inactive-frame-color = @titlebar_bg_color
ChromeGtkFrame::incognito-frame-gradient-size = 0
ChromeGtkFrame::incognito-frame-gradient-color = @titlebar_bg_color
ChromeGtkFrame::scrollbar-trough-color = @bg_color
ChromeGtkFrame::scrollbar-slider-normal-color = mix (0.21, @fg_color, @bg_color)
ChromeGtkFrame::scrollbar-slider-prelight-color = mix (0.31, @fg_color, @bg_color)
}
class "ChromeGtkFrame" style "chrome-gtk-frame"
widget_class "*Chrom*Button*" style "chromium-toolbar-button"
# General Styles
class "GtkWidget" style "murrine-default"
class "GtkFrame" style "murrine-wide"
class "MetaFrames" style "metacity-frame"
class "GtkWindow" style "metacity-frame"
class "GtkSeparator" style "murrine-wide"
class "GtkCalendar" style "murrine-wide"
class "GtkSpinButton" style "murrine-spinbutton"
class "GtkScale" style "murrine-scale"
class "GtkVScale" style "murrine-vscale"
class "GtkHScale" style "murrine-hscale"
class "GtkScrollbar" style "murrine-scrollbar"
class "GtkVScrollbar" style "murrine-vscrollbar"
class "GtkHScrollbar" style "murrine-hscrollbar"
class "GtkRadio*" style "murrine-radiocheck"
class "GtkCheck*" style "murrine-radiocheck"
class "GtkEntry" style "murrine-entry"
widget_class "*<GtkNotebook>" style "murrine-notebook"
widget_class "*<GtkNotebook>*<GtkEventBox>" style "murrine-notebook-bg"
widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "murrine-notebook-bg"
widget_class "*<GtkNotebook>*<GtkLayout>" style "murrine-notebook-bg"
widget_class "*.GtkNotebook.*.GtkViewport" style "murrine-notebook"
widget_class "*<GtkButton>" style "murrine-button"
widget_class "*<GtkStatusbar>*" style "murrine-statusbar"
widget_class "*<GtkProgress>" style "murrine-progressbar"
widget_class "*<GtkProgressBar>" style "murrine-progressbar"
widget_class "*<GtkComboBoxEntry>*" style "murrine-comboboxentry"
widget_class "*<GtkCombo>*" style "murrine-comboboxentry"
widget_class "*<GtkMenu>*" style "murrine-menu"
widget_class "*<GtkMenuItem>*" style "murrine-menu-item"
widget_class "*<GtkSeparatorMenuItem>*" style "murrine-separator-menu-item"
widget_class "*Menu*.*Sepa*" style "murrine-separator-menu-item"
widget_class "*<GtkMenuBar>*" style "murrine-menubar"
widget_class "*<GtkMenuBar>*<GtkMenuItem>*" style "murrine-menubaritem"
widget_class "*GtkToolButton*" style "murrine-toolbutton"
widget_class "*GtkToggleToolButton*" style "murrine-toolbutton"
widget_class "*GtkMenuToolButton*" style "murrine-toolbutton"
widget_class "*GtkToolbar*Button" style "murrine-toolbutton"
widget_class "*.<GtkFrame>.<GtkLabel>" style "murrine-frame-title"
widget_class "*.<GtkTreeView>*" style "murrine-treeview"
widget_class "*.<GtkTreeView>.<GtkButton>" style "murrine-treeview-header"
widget_class "*.<GtkCTree>.<GtkButton>" style "murrine-treeview-header"
widget_class "*.<GtkList>.<GtkButton>" style "murrine-treeview-header"
widget_class "*.<GtkCList>.<GtkButton>" style "murrine-treeview-header"
widget "gtk-tooltip*" style "murrine-tooltips"
widget_class "*<GtkScrolledWindow>*<OsScrollbar>" style "murrine-overlay-scrollbar"
# Workarounds and Non-Standard Styling
style "text-is-fg-color-workaround" {
text[NORMAL] = @text_color
text[PRELIGHT] = @fg_color
text[SELECTED] = @selected_fg_color
text[ACTIVE] = @fg_color
text[INSENSITIVE] = mix (0.5, @bg_color, @fg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>" style "text-is-fg-color-workaround"
style "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 (@fg_color)
}
widget_class "*<GtkListItem>*" style "fg-is-text-color-workaround"
widget_class "*<GtkCList>" style "fg-is-text-color-workaround"
widget_class "*<EelEditableLabel>" style "fg-is-text-color-workaround"
style "murrine-evo-new-button-workaround" {
engine "murrine" {
toolbarstyle = 0
}
}
widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "murrine-evo-new-button-workaround"
style "inkscape-toolbar-fix" {
engine "murrine" {
gradient_shades = { 1.0, 1.0, 1.0, 1.0 }
highlight_shade = 1.0
}
}
#widget "*GtkHandleBox*" style "inkscape-toolbar-fix"
#widget "*HandleBox*CommandsToolbar*" style "inkscape-toolbar-fix"
#widget "*HandleBox*SnapToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*SelectToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*NodeToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*TweakToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*ZoomToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*StarToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*RectToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*3DBoxToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*ArcToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*SpiralToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*PencilToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*PenToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*CalligraphyToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*EraserToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*LPEToolToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*DropperToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*ConnectorToolbar*" style "inkscape-toolbar-fix"
widget "*HandleBox*PaintbucketToolbar*" style "inkscape-toolbar-fix"
# Performance Fixes
style "performance-fix" {
engine "murrine" {
textstyle = 0
}
}
widget_class "*gtkmm__GtkWindow*" style "performance-fix" # Inkscape
widget_class "*GimpDisplayShell*" style "performance-fix" # Gimp
widget_class "*GimpToolbox*" style "performance-fix"
widget_class "*GimpMenuDock*" style "performance-fix"
widget "*OOoFixed*" style "performance-fix" # Openoffice/Libreoffice
widget_class "*MozContainer*" style "performance-fix" # Firefox (Not sure if this one does anything though.)
widget_class "*XfceHeading*" style "xfce-header"
widget_class "*XfceDesktop*" style "xfdesktop-windowlist"
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"
widget "xfwm4-tabwin*" style "xfwm-tabwin"
widget_class "*XfsmLogoutDialog*" style "xfsm-logout"
widget_class "*XfsmLogoutDialog*GtkButton" style "xfsm-logout-button"
widget "*Panel*" style "panel"
widget "*PanelWidget*" style "panel"
widget "*PanelApplet*" style "panel"
widget "*fast-user-switch*" style "panel" # workaround for Fast User Switch applet
widget "*CPUFreqApplet*" style "panel" # workaround for CpuFreq Applet
class "PanelApp*" style "panel"
class "PanelToplevel*" style "panel"
#widget_class "*Mail*" style "panel"
widget_class "*notif*" style "panel"
#widget_class "*?anel*utton" style "panel_task_button" # causing problems to monodevelop
widget "*task*" style "panel_task_button"
widget "*.tasklist-button" style "panel_task_button"
widget "*PanelApplet*TaskTitle*" style "panel_task_button"
widget_class "*Xfce*Panel*" style "XFCE"
class "GtkScrollbar" style "murrine-scrollbar"

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Type=X-GNOME-Metatheme
Name=OS X El Capitan
Comment=A theme by Christian Medel (Elbullazul) simulating OS X 10.11 El Capitan
Comment=v0.5
Encoding=UTF-8
[X-GNOME-Metatheme]
GtkTheme=OS X El Capitan
MetacityTheme=OS X El Capitan
ButtonLayout=:minimize,maximize,close

View File

@ -0,0 +1,2 @@
include "ClearlooksBrave/gtk-2.0/gtkrc"
include "gtkrc-keybindings"

View File

@ -0,0 +1,157 @@
gtk-enable-mnemonics = 0
binding "gtk-mac-alt-arrows"
{
bind "<alt>Right" { "move-cursor" (words, 1, 0) }
bind "<alt>KP_Right" { "move-cursor" (words, 1, 0) }
bind "<alt>Left" { "move-cursor" (words, -1, 0) }
bind "<alt>KP_Left" { "move-cursor" (words, -1, 0) }
bind "<shift><alt>Right" { "move-cursor" (words, 1, 1) }
bind "<shift><alt>KP_Right" { "move-cursor" (words, 1, 1) }
bind "<shift><alt>Left" { "move-cursor" (words, -1, 1) }
bind "<shift><alt>KP_Left" { "move-cursor" (words, -1, 1) }
}
class "GtkTextView" binding "gtk-mac-alt-arrows"
class "GtkLabel" binding "gtk-mac-alt-arrows"
class "GtkEntry" binding "gtk-mac-alt-arrows"
binding "gtk-mac-alt-delete"
{
bind "<alt>Delete" { "delete-from-cursor" (word-ends, 1) }
bind "<alt>KP_Delete" { "delete-from-cursor" (word-ends, 1) }
bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) }
}
class "GtkTextView" binding "gtk-mac-alt-delete"
class "GtkEntry" binding "gtk-mac-alt-delete"
binding "gtk-mac-cmd-c"
{
bind "<meta>x" { "cut-clipboard" () }
bind "<meta>c" { "copy-clipboard" () }
bind "<meta>v" { "paste-clipboard" () }
unbind "<ctrl>x"
unbind "<ctrl>c"
unbind "<ctrl>v"
}
class "GtkTextView" binding "gtk-mac-cmd-c"
class "GtkEntry" binding "gtk-mac-cmd-c"
binding "gtk-mac-text-view"
{
bind "<shift><meta>a" { "select-all" (0) }
bind "<meta>a" { "select-all" (1) }
unbind "<shift><ctrl>a"
unbind "<ctrl>a"
}
class "GtkTextView" binding "gtk-mac-text-view"
binding "gtk-mac-label"
{
bind "<meta>a" {
"move-cursor" (paragraph-ends, -1, 0)
"move-cursor" (paragraph-ends, 1, 1)
}
bind "<shift><meta>a" { "move-cursor" (paragraph-ends, 0, 0) }
bind "<meta>c" { "copy-clipboard" () }
unbind "<ctrl>a"
unbind "<shift><ctrl>a"
unbind "<ctrl>c"
}
class "GtkLabel" binding "gtk-mac-label"
binding "gtk-mac-entry"
{
bind "<meta>a" {
"move-cursor" (buffer-ends, -1, 0)
"move-cursor" (buffer-ends, 1, 1)
}
bind "<shift><meta>a" { "move-cursor" (visual-positions, 0, 0) }
unbind "<ctrl>a"
unbind "<shift><ctrl>a"
}
class "GtkEntry" binding "gtk-mac-entry"
binding "gtk-mac-cmd-arrows"
{
bind "<meta>Left" { "move-cursor" (paragraph-ends, -1, 0) }
bind "<meta>KP_Left" { "move-cursor" (paragraph-ends, -1, 0) }
bind "<shift><meta>Left" { "move-cursor" (paragraph-ends, -1, 1) }
bind "<shift><meta>KP_Left" { "move-cursor" (paragraph-ends, -1, 1) }
bind "<meta>Right" { "move-cursor" (paragraph-ends, 1, 0) }
bind "<meta>KP_Right" { "move-cursor" (paragraph-ends, 1, 0) }
bind "<shift><meta>Right" { "move-cursor" (paragraph-ends, 1, 1) }
bind "<shift><meta>KP_Right" { "move-cursor" (paragraph-ends, 1, 1) }
}
class "GtkTextView" binding "gtk-mac-cmd-arrows"
class "GtkLabel" binding "gtk-mac-cmd-arrows"
class "GtkEntry" binding "gtk-mac-cmd-arrows"
binding "gtk-mac-emacs-like"
{
bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) }
bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) }
bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) }
bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) }
bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) }
bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) }
bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) }
bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) }
}
class "GtkTextView" binding "gtk-mac-emacs-like"
class "GtkLabel" binding "gtk-mac-emacs-like"
class "GtkEntry" binding "gtk-mac-emacs-like"
binding "gtk-mac-file-chooser"
{
bind "<meta>v" { "location-popup-on-paste" () }
unbind "<ctrl>v"
bind "<meta><shift>G" { "location-popup" () }
bind "<meta><shift>H" { "home-folder" () }
bind "<meta>Up" { "up-folder" () }
}
class "GtkFileChooserDefault" binding "gtk-mac-file-chooser"
binding "gtk-mac-tree-view"
{
bind "<meta>a" { "select-all" () }
bind "<shift><meta>a" { "unselect-all" () }
bind "<meta>f" { "start-interactive-search" () }
bind "<meta>F" { "start-interactive-search" () }
unbind "<ctrl>a"
unbind "<shift><ctrl>a"
unbind "<ctrl>f"
unbind "<ctrl>F"
}
class "GtkTreeView" binding "gtk-mac-tree-view"
binding "gtk-mac-icon-view"
{
bind "<meta>a" { "select-all" () }
bind "<shift><meta>a" { "unselect-all" () }
unbind "<ctrl>a"
unbind "<shift><ctrl>a"
}
class "GtkIconView" binding "gtk-mac-icon-view"

View File

@ -1,5 +1,31 @@
#!/bin/bash
#####################################################################
# HELPER FUNCTIONS
#####################################################################
# Libraries work.
change_framework_library_load_path() {
local bin_to_fix=$1
local path=$2
# First iteration - main libraries.
echo "Copying libraries..."
dylibbundler -of -b -x ${bin_to_fix} -d ./URTrator.app/Contents/Framework/ -p ${path}
# Fix shit for dylibbundler. By this moment we should have everything
# we needed in Framework directory.
for lib in $(ls ./URTrator.app/Contents/Framework); do
libname=$(echo ${lib} | awk -F"/" {' print $NF '})
DEPS=$(otool -L ./URTrator.app/Contents/Framework/${lib} | grep "/usr/local")
for dep in ${DEPS[@]}; do
dep_name=$(echo ${dep} | awk -F"/" {' print $NF '})
install_name_tool -change ${dep} ${path}/${dep_name} ./URTrator.app/Contents/Framework/${libname}
done
done
}
# More permissive UMASK.
umask 002
# Do some checks.
# Do we have brew installed?
@ -40,8 +66,11 @@ fi
echo "Creating app bundle..."
mkdir -p URTrator.app/Contents/{MacOS,Framework,Resources}
# Copying URTrator binary
cp $GOPATH/bin/urtrator URTrator.app/Contents/MacOS/
cp $GOPATH/src/github.com/pztrn/urtrator/artwork/urtrator.icns URTrator.app/Contents/Resources/
# Copying main resources.
cp $GOPATH/src/github.com/pztrn/urtrator/artwork/urtrator.icns ./URTrator.app/Contents/Resources/
cp -R ./Resources/themes ./URTrator.app/Contents/Resources/
#####################################################################
# APP BUNDLE INFO.PLIST
@ -73,27 +102,53 @@ INFOPLIST='<?xml version="1.0" encoding="UTF-8"?>
</dict>
</plist>'
echo ${INFOPLIST} > URTrator.app/Contents/Info.plist
echo -e ${INFOPLIST} > URTrator.app/Contents/Info.plist
echo -e '#!/bin/bash\ncd "${0%/*}"\n./urtrator' > ./URTrator.app/Contents/MacOS/urtrator.sh
echo -e '#!/bin/bash\ncd "${0%/*}"\nexport GTK_PATH="../lib/gtk-2.0/"\nexport GTK_MODULES="../lib/gtk-2.0/"\nexport GDK_PIXBUF_MODULE_FILE="../lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"\nexport GDK_PIXBUF_MODULEDIR="../lib/gdk-pixbuf-2.0/2.10.0/loaders/"\nexport GTK_EXE_PREFIX="../lib"\n./urtrator' > ./URTrator.app/Contents/MacOS/urtrator.sh
chmod +x ./URTrator.app/Contents/MacOS/urtrator.sh
#####################################################################
# Copying helper binaries.
cp /usr/local/Cellar/gdk-pixbuf/2.36.0_2/bin/gdk-pixbuf-query-loaders ./URTrator.app/Contents/MacOS/
# Copy GTK engines as needed for default theme.
cp /usr/local/lib/gtk-2.0/2.10.0/engines/* ./URTrator.app/Contents/Framework/
cp /usr/local/Cellar/gdk-pixbuf/2.36.0_2/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.so ./URTrator.app/Contents/Framework/
chmod -R 0644 ./URTrator.app/Contents/Framework/*
chmod -R 0755 ./URTrator.app/Contents/MacOS/*
# Libraries works.
# First iteration - main libraries.
echo "Copying libraries..."
dylibbundler -of -b -x ./URTrator.app/Contents/MacOS/urtrator -d ./URTrator.app/Contents/Framework/ -p @executable_path/../Framework/
change_framework_library_load_path "./URTrator.app/Contents/MacOS/urtrator" "@executable_path/../Framework"
change_framework_library_load_path "./URTrator.app/Contents/MacOS/gdk-pixbuf-query-loaders" "@executable_path/../Framework"
# Fix shit for dylibbundler. By this moment we should have everything
# we needed in Framework directory.
for lib in $(ls ./URTrator.app/Contents/Framework); do
libname=$(echo ${lib} | awk -F"/" {' print $NF '})
DEPS=$(otool -L ./URTrator.app/Contents/Framework/${lib} | grep "/usr/local")
#####################################################################
# Directory structure for GTK things. We will symlink neccessary
# libraries from /Framework here.
echo "Creating libraries structure with symlinks"
# GTK engines
mkdir -p ./URTrator.app/Contents/lib/gtk-2.0/2.10.0/engines/
cd ./URTrator.app/Contents/lib/gtk-2.0/2.10.0/engines/
ln -s ../../../../Framework/libclearlooks.so libclearlooks.so
ln -s ../../../../Framework/libmurrine.so libmurrine.so
ln -s ../../../../Framework/libpixmap.so libpixmap.so
# Pixbuf loaders
cd ../../../../
mkdir -p lib/gdk-pixbuf-2.0/2.10.0/loaders/
cd lib/gdk-pixbuf-2.0/2.10.0/loaders/
for file in $(ls ../../../../Framework | grep libpixbufloader); do
ln -s ../../../../Framework/${file} ${file}
done
# Fix pixbuf loaders to load things from "../Framework".
for file in $(ls . | grep libpixbufloader); do
DEPS=$(otool -L ${file} | grep "executable_path")
for dep in ${DEPS[@]}; do
dep_name=$(echo ${dep} | awk -F"/" {' print $NF '})
install_name_tool -change ${dep} @executable_path/../Framework/${dep_name} ./URTrator.app/Contents/Framework/${libname}
install_name_tool -change ${dep} ../Framework/${dep_name} ${file}
done
done
cd ..
ln -s ../../../Framework .
cd ../../../MacOS
GDK_PIXBUF_MODULE_FILE="../lib/gdk-pixbuf-2.0/loaders.cache" GDK_PIXBUF_MODULEDIR="../lib/gdk-pixbuf-2.0/2.10.0/loaders/" GTK_EXE_PREFIX="../lib" GTK_PATH="../Framework" ./gdk-pixbuf-query-loaders > ../lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
echo "Finishing..."

View File

@ -29,6 +29,8 @@ type MainWindow struct {
// Gamemodes.
gamemodes map[string]string
text string
// Widgets.
// The window itself.
window *gtk.Window

View File

@ -76,7 +76,11 @@ func (m *MainWindow) Initialize() {
m.options_dialog = &OptionsDialog{}
// Main menu.
m.InitializeMainMenu()
if runtime.GOOS == "darwin" {
m.initializeMacMenu()
} else {
m.InitializeMainMenu()
}
// Toolbar.
m.InitializeToolbar()
@ -140,6 +144,7 @@ func (m *MainWindow) Initialize() {
profile_and_launch_hbox.PackStart(m.launch_button, false, true, 5)
m.window.Add(m.vbox)
m.window.ShowAll()
// Launch events.

28
ui/mainwindow_init_mac.go Normal file
View File

@ -0,0 +1,28 @@
package ui
import (
// stdlib
"os"
"path/filepath"
"runtime"
// other
"github.com/mattn/go-gtk/gtk"
)
func (m *MainWindow) initializeMac() {
if runtime.GOOS == "darwin" {
dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
gtk.RCParse(dir + "/../Resources/themes/gtkrc-keybindings")
// ToDo: theming support and theme seletion in settings.
gtk.RCParse(dir + "/../Resources/themes/ClearlooksBrave/gtk-2.0/gtkrc")
}
}
func (m *MainWindow) initializeMacMenu() {
// This is a placeholder, in future we will use native mac menu.
// For now it launches default menu initialization.
m.InitializeMainMenu()
}