summaryrefslogtreecommitdiffstats
path: root/osx
diff options
context:
space:
mode:
Diffstat (limited to 'osx')
-rw-r--r--osx/Info.plist.in8
-rwxr-xr-xosx/bundleify.sh25
-rw-r--r--osx/fonts.conf150
-rw-r--r--osx/gtkrc275
-rw-r--r--osx/pango.modules4
5 files changed, 251 insertions, 211 deletions
diff --git a/osx/Info.plist.in b/osx/Info.plist.in
index 2c98497..9fb93c4 100644
--- a/osx/Info.plist.in
+++ b/osx/Info.plist.in
@@ -26,6 +26,14 @@
<dict>
<key>DYLD_LIBRARY_PATH</key>
<string>lib</string>
+ <key>GTK_PATH</key>
+ <string>lib</string>
+ <key>FONTCONFIG_FILE</key>
+ <string>Resources/fonts.conf</string>
+ <key>PANGO_RC_FILE</key>
+ <string>Resources/pangorc</string>
+ <key>GTK2_RC_FILES</key>
+ <string>Resources/gtkrc</string>
</dict>
</dict>
</plist>
diff --git a/osx/bundleify.sh b/osx/bundleify.sh
index 220eb78..75bb030 100755
--- a/osx/bundleify.sh
+++ b/osx/bundleify.sh
@@ -1,18 +1,27 @@
#!/bin/sh
-bundle=$1
-exe=$2
+if [ "$#" != 3 ]; then
+ echo "USAGE: $0 LIB_PREFIX BUNDLE EXE";
+ exit 1;
+fi
+
+prefix=$1
+bundle=$2
+exe=$3
mkdir -p "$bundle/Contents/lib"
-mkdir -p "$bundle/Contents/lib/engines"
-mkdir -p "$bundle/Contents/lib/modules"
# Replace Control with Command in key bindings
sed -i '' 's/GDK_CONTROL_MASK/GDK_META_MASK/' $bundle/Contents/patchage.ui
+# Copy font configuration files
+cp $prefix/etc/fonts/fonts.conf $bundle/Contents/Resources
+
# Copy GTK and pango modules to bundle
-cp /usr/local/lib/gtk-2.0/2.10.0/engines/libquartz.so $bundle/Contents/lib/engines
-cp /opt/local/lib/pango/1.6.0/modules/*basic*.so $bundle/Contents/lib/modules
+mkdir -p "$bundle/Contents/lib/modules"
+mkdir -p "$bundle/Contents/lib/gtk-2.0/engines"
+cp $prefix/lib/gtk-2.0/2.10.0/engines/libquartz.so $bundle/Contents/lib/gtk-2.0/engines
+cp $prefix/lib/pango/1.8.0/modules/*basic*.so $bundle/Contents/lib/modules
# Copy libraries depended on by the executable to bundle
libs="`otool -L $exe | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`"
@@ -21,13 +30,13 @@ for l in $libs; do
done
# Add libraries depended on by those libraries
-reclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`"
+reclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/gtk-2.0/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep \"$prefix\|/User\|/opt/local\|/usr/local\" | sed 's/(.*//'`"
for l in $reclibs; do
cp $l $bundle/Contents/lib
done
# ... and libraries depended on by those libraries (yes, this should be done more sanely)
-recreclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep '/User\|/opt/local\|/usr/local' | sed 's/(.*//'`"
+recreclibs="`otool -L $bundle/Contents/lib/* $bundle/Contents/lib/gtk-2.0/engines/* $bundle/Contents/lib/modules/* | grep '\.dylib\|\.so' | grep \"$prefix\|/User\|/opt/local\|/usr/local\" | sed 's/(.*//'`"
for l in $recreclibs; do
cp $l $bundle/Contents/lib
done
diff --git a/osx/fonts.conf b/osx/fonts.conf
deleted file mode 100644
index 766e742..0000000
--- a/osx/fonts.conf
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
-<!-- /etc/fonts/fonts.conf file to configure system font access -->
-<fontconfig>
-
-<!--
- DO NOT EDIT THIS FILE.
- IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
- LOCAL CHANGES BELONG IN 'local.conf'.
-
- The intent of this standard configuration file is to be adequate for
- most environments. If you have a reasonably normal environment and
- have found problems with this configuration, they are probably
- things that others will also want fixed. Please submit any
- problems to the fontconfig bugzilla system located at fontconfig.org
-
- Note that the normal 'make install' procedure for fontconfig is to
- replace any existing fonts.conf file with the new version. Place
- any local customizations in local.conf which this file references.
-
- Keith Packard
--->
-
-<!-- Font directory list -->
-
- <dir>~/Library/Fonts</dir>
- <dir>~/.fonts</dir>
- <dir>/Library/Fonts</dir>
- <dir>/System/Library/Fonts</dir>
-
-<!-- Font cache directory list -->
-
- <cachedir>~/.fontconfig</cachedir>
-
-<!--
- Accept deprecated 'mono' alias, replacing it with 'monospace'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>mono</string>
- </test>
- <edit name="family" mode="assign">
- <string>monospace</string>
- </edit>
- </match>
-
-<!--
- Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans serif</string>
- </test>
- <edit name="family" mode="assign">
- <string>sans-serif</string>
- </edit>
- </match>
-
-<!--
- Accept deprecated 'sans' alias, replacing it with 'sans-serif'
--->
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans</string>
- </test>
- <edit name="family" mode="assign">
- <string>sans-serif</string>
- </edit>
- </match>
-
-<!--
- Load local system customization file
--->
- <include ignore_missing="yes">conf.d</include>
-
- <config>
-<!--
- These are the default Unicode chars that are expected to be blank
- in fonts. All other blank chars are assumed to be broken and
- won't appear in the resulting charsets
- -->
- <blank>
- <int>0x0020</int> <!-- SPACE -->
- <int>0x00A0</int> <!-- NO-BREAK SPACE -->
- <int>0x00AD</int> <!-- SOFT HYPHEN -->
- <int>0x034F</int> <!-- COMBINING GRAPHEME JOINER -->
- <int>0x0600</int> <!-- ARABIC NUMBER SIGN -->
- <int>0x0601</int> <!-- ARABIC SIGN SANAH -->
- <int>0x0602</int> <!-- ARABIC FOOTNOTE MARKER -->
- <int>0x0603</int> <!-- ARABIC SIGN SAFHA -->
- <int>0x06DD</int> <!-- ARABIC END OF AYAH -->
- <int>0x070F</int> <!-- SYRIAC ABBREVIATION MARK -->
- <int>0x115F</int> <!-- HANGUL CHOSEONG FILLER -->
- <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
- <int>0x1680</int> <!-- OGHAM SPACE MARK -->
- <int>0x17B4</int> <!-- KHMER VOWEL INHERENT AQ -->
- <int>0x17B5</int> <!-- KHMER VOWEL INHERENT AA -->
- <int>0x180E</int> <!-- MONGOLIAN VOWEL SEPARATOR -->
- <int>0x2000</int> <!-- EN QUAD -->
- <int>0x2001</int> <!-- EM QUAD -->
- <int>0x2002</int> <!-- EN SPACE -->
- <int>0x2003</int> <!-- EM SPACE -->
- <int>0x2004</int> <!-- THREE-PER-EM SPACE -->
- <int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
- <int>0x2006</int> <!-- SIX-PER-EM SPACE -->
- <int>0x2007</int> <!-- FIGURE SPACE -->
- <int>0x2008</int> <!-- PUNCTUATION SPACE -->
- <int>0x2009</int> <!-- THIN SPACE -->
- <int>0x200A</int> <!-- HAIR SPACE -->
- <int>0x200B</int> <!-- ZERO WIDTH SPACE -->
- <int>0x200C</int> <!-- ZERO WIDTH NON-JOINER -->
- <int>0x200D</int> <!-- ZERO WIDTH JOINER -->
- <int>0x200E</int> <!-- LEFT-TO-RIGHT MARK -->
- <int>0x200F</int> <!-- RIGHT-TO-LEFT MARK -->
- <int>0x2028</int> <!-- LINE SEPARATOR -->
- <int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
- <int>0x202A</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
- <int>0x202B</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
- <int>0x202C</int> <!-- POP DIRECTIONAL FORMATTING -->
- <int>0x202D</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
- <int>0x202E</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
- <int>0x202F</int> <!-- NARROW NO-BREAK SPACE -->
- <int>0x205F</int> <!-- MEDIUM MATHEMATICAL SPACE -->
- <int>0x2060</int> <!-- WORD JOINER -->
- <int>0x2061</int> <!-- FUNCTION APPLICATION -->
- <int>0x2062</int> <!-- INVISIBLE TIMES -->
- <int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
- <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
- <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
- <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
- <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
- <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
- <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
- <int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
- <int>0x3164</int> <!-- HANGUL FILLER -->
- <int>0xFEFF</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
- <int>0xFFA0</int> <!-- HALFWIDTH HANGUL FILLER -->
- <int>0xFFF9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
- <int>0xFFFA</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
- <int>0xFFFB</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
- </blank>
-<!--
- Rescan configuration every 30 seconds when FcFontSetList is called
- -->
- <rescan>
- <int>30</int>
- </rescan>
- </config>
-
-</fontconfig>
diff --git a/osx/gtkrc b/osx/gtkrc
index ba7477b..d3ae142 100644
--- a/osx/gtkrc
+++ b/osx/gtkrc
@@ -1,75 +1,248 @@
-# FIXME: What sizes should we have?
-gtk-icon-sizes = "gtk-menu=16,16:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32"
-gtk-toolbar-icon-size = small-toolbar
+gtk-color-scheme =
+"bg_color: #f5f5f5
+fg_color: #000
+base_color: #fff
+text_color: #000
+selected_bg_color: #0066FF
+selected_fg_color: #fff
+tooltip_bg_color: #fafaba
+tooltip_fg_color: #000"
+
+gtk-button-images = 0
+gtk-menu-images = 0
+gtk-toolbar-style = 0
+gtk-enable-mnemonics = 0
+gtk-icon-sizes = "gtk-small-toolbar=16,16:gtk-large-toolbar=22,22"
+gtk-toolbar-icon-size = large-toolbar
+gtk-error-bell = 0
+gtk-show-input-method-menu = 0
+
+style "default"
+{
+ bg[NORMAL] = @bg_color
+ bg[PRELIGHT] = @bg_color
+ bg[SELECTED] = @selected_bg_color
+ bg[INSENSITIVE] = @bg_color
+ bg[ACTIVE] = @bg_color
+
+ fg[NORMAL] = @fg_color
+ fg[PRELIGHT] = @fg_color
+ fg[SELECTED] = @selected_fg_color
+ fg[INSENSITIVE] = darker (@bg_color)
+ fg[ACTIVE] = @fg_color
+
+ text[NORMAL] = @text_color
+ text[PRELIGHT] = @text_color
+ text[SELECTED] = @selected_fg_color
+ text[INSENSITIVE] = darker (@bg_color)
+ text[ACTIVE] = @text_color
+
+ base[NORMAL] = @base_color
+ base[PRELIGHT] = @selected_bg_color
+ base[SELECTED] = @selected_bg_color
+ base[INSENSITIVE] = @bg_color
+ base[ACTIVE] = shade (1.3, @selected_bg_color)
+
+ GtkWidget::interior-focus = 1
+ GtkWidget::new-tooltip-style = 1
+ GtkWidget::focus-line-width = 0
+ GtkWidget::focus-padding = 0
+ GtkButton::default-border = { 1, 1, 1, 1 }
+ GtkButton::default-outside-border = { 1, 1, 1, 1 }
+ GtkButton::child-displacement-x = 0
+ GtkButton::child-displacement-y = 0
+ GtkCheckButton::indicator-spacing = 3
+ GtkSpinButton::shadow-type = out
+ GtkButtonBox::child-min-width = 70
+ GtkButtonBox::child-min-height = 22
+ GtkComboBox::appears-as-list = 0
+ GtkComboBox::focus-on-click = 0
+ GtkNotebook::tab-curvature = 4
+ GtkNotebook::tab-overlap = 0
+ GtkTreeView::allow-rules = 1
+ GtkTreeView::expander-size = 14
+ GtkToolbar::internal-padding = 3
+ GtkExpander::expander-size = 14
+ GtkScrolledWindow::scrollbar-spacing = 0
+ GtkMenuItem::horizontal-padding = 8
+ GtkMenu::vertical-padding = 4
+ GtkMenuItem::horizontal-padding = 9
+ GtkMenuItem::toggle-spacing = 0
+ GtkSeparatorMenuItem::horizontal-padding = 2
+ GtkSeparatorMenuItem::horizontal-padding = 2
+ GtkScrollbar::min-slider-length = 10
+ GtkScrollbar::has-forward-stepper = 1
+ GtkScrollbar::has-backward-stepper = 0
+ GtkScrollbar::has-secondary-forward-stepper = 0
+ GtkScrollbar::has-secondary-backward-stepper = 1
+ GtkRange::trough-border = 0
+ GtkRange::stepper-spacing = 0
+ GtkRange::stepper-size = 14
+ GtkRange::trough-under-steppers = 1
+
+ engine "quartz"
+ {
+ buttontype = "aqua"
+ }
+}
+
+style "wider"
+{
+ xthickness = 3
+ ythickness = 3
+}
+
+style "scrolled-window"
+{
+ xthickness = 1
+ ythickness = 1
+}
+
+style "menu"
+{
+ xthickness = 0
+ ythickness = 0
+ font_name = "Lucida Grande 14"
+
+ bg[PRELIGHT] = @selected_fg_color
+ fg[PRELIGHT] = @selected_fg_color
+ text[PRELIGHT] = @selected_fg_color
+}
+
+style "menu-item" = "menu"
+{
+ ythickness = 2
+ GtkWidget::draw-border = { 0, 0, 0, 2 }
+}
+
+style "menu-separator" = "menu-item"
+{
+ ythickness = 3
+}
+
+style "menu-bar"
+{
+ ythickness = 0
+ xthickness = 0
+}
+
+style "treeview"
+{
+ GtkTreeView::odd-row-color = "#f5f5f5"
+
+ base[SELECTED] = "#2b5dcd"
+ base[ACTIVE] = "#cacaca"
+ text[SELECTED] = "#FFF"
+ text[ACTIVE] = "#000"
+
+ font_name = "Lucida Grande 12"
-gtk_color_scheme = "fg_color:#000\nbg_color:ededed\nbase_color:#fff\ntext_color:#1A1A1A\nselected_bg_color:#86ABD9\nselected_fg_color:#fff\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000"
+ GtkWidget::focus-line-width = 0
+ GtkWidget::draw-border = { 1, 1, 1, 1 }
+ GtkButton::inner-border = { 3, 3, 1, 3 }
+}
-gtk-button-images = 0
-gtk-menu-images = 0
-gtk-enable-mnemonics = 0
+style "tree-header"
+{
+ ythickness = 0
+ bg[NORMAL] = "#f2f2f2"
-style "quartz-default"
+ font_name = "Lucida Grande 11"
+}
+
+style "tooltip"
{
- xthickness = 0
- ythickness = 0
+ xthickness = 5
+ ythickness = 5
- GtkWidget::interior-focus = 1
- GtkWidget::focus-line-width = 0
- GtkWidget::focus-padding = 0
+ fg[NORMAL] = @tooltip_fg_color
+ bg[NORMAL] = @tooltip_bg_color
+}
- GtkButton::default-border = { 0, 0, 0, 0 }
- GtkButton::default-outside-border = { 0, 0, 0, 0 }
- GtkButton::child-displacement-x = 0
- GtkButton::child-displacement-y = 0
+style "scrollbar"
+{
+ GtkScrollbar::has-forward-stepper = 0
+ GtkScrollbar::has-backward-stepper = 0
+ GtkRange::slider-width = 15
+ GtkRange::trough-border = 0
+ GtkRange::trough-side-details = 0
+}
- GtkCheckButton::indicator-spacing = 3
+style "button"
+{
+ xthickness = 2
+ ythickness = 2
- #GtkOptionMenu::indicator-size = { 9, 5 }
- #GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
+ bg[NORMAL] = @bg_color
+ bg[PRELIGHT] = shade(1.1, @bg_color)
+ bg[ACTIVE] = @bg_color
+ bg[INSENSITIVE] = @bg_color
- # We have to set a shadow to get the whole box exposed
- GtkSpinButton::shadow-type = out
+ GtkWidget::draw-border = { 2, 2, 2, 2 }
+ GtkWidget::focus-line-width = 1
+}
- GtkComboBox::appears-as-list = 0
- GtkComboBox::focus-on-click = 0
+style "combo-box"
+{
+ fg[NORMAL] = "#616161"
+ #xthickness = 2
+ #ythickness = 2
+}
- GtkNotebook::tab-curvature = 4
- GtkNotebook::tab-overlap = 0
-
- GtkTreeView::allow-rules = 1
- GtkTreeView::expander-size = 14
- GtkToolbar::internal-padding = 3
- GtkExpander::expander-size = 14
+style "combo-box-button"
+{
+ xthickness = 6
+ ythickness = 2
- GtkScrolledWindow::scrollbar-spacing = 0
+ bg[NORMAL] = @base_color
+ bg[PRELIGHT] = shade(1.1, @base_color)
+ bg[ACTIVE] = @base_color
+ bg[INSENSITIVE] = @base_color
- #GtkMenuItem::toggle-spacing = ...
- GtkMenuItem::horizontal-padding = 8
- GtkSeparatorMenuItem::horizontal-padding = 2
+ GtkWidget::focus-padding = 0
+}
- engine "quartz"
- {
- }
+style "combo-box-label" = "combo-box"
+{
+ fg[NORMAL] = "#595959"
}
-class "*" style "quartz-default"
-style "quartz-toolbar"
+style "small-font"
{
- xthickness = 3
- ythickness = 3
+ font_name = "Lucida Grande 11"
}
-widget_class "*Toolbar*" style "quartz-toolbar"
-style "quartz-frame"
+style "mini-font"
{
- xthickness = 2
- ythickness = 2
+ font_name = "Lucida Grande 9"
}
-widget_class "*.<GtkFrame>" style "quartz-frame"
-style "quartz-scrolled-window"
+style "entry"
{
- xthickness = 2
- ythickness = 2
+ xthickness = 2
+ ythickness = 2
+ GtkEntry::inner-border = { 2, 2, 2, 2 }
+ base[INSENSITIVE] = shade(1.02, @bg_color)
}
-widget_class "*.<GtkScrolledWindow>" style "quartz-scrolled-window"
+
+class "GtkWidget" style "default"
+class "GtkMenuBar" style "menu-bar"
+class "GtkScrolledWindow" style "scrolled-window"
+class "GtkFrame" style "wider"
+class "GtkScrollbar" style "scrollbar"
+class "GtkEntry" style "entry"
+class "GtkButton" style "button"
+
+widget "gtk-tooltip*" style "tooltip"
+widget "*small-font*" style "small-font"
+widget "*mini-font*" style "mini-font"
+
+widget_class "*<GtkMenu>*" style "menu"
+widget_class "*<GtkMenuItem>*" style "menu-item"
+widget_class "*<GtkSeparatorMenuItem>" style "menu-separator"
+/*widget "*.gtk-combobox-popup-menu*" style "combo-box-menu"*/
+widget_class "*.<GtkTreeView>*" style "treeview"
+widget_class "*.GtkTreeView.GtkButton" style "tree-header"
+widget_class "*.<GtkComboBox>.*" style "combo-box"
+widget_class "*.<GtkComboBoxText>.<GtkToggleButton>" style "combo-box-button"
+widget_class "*.<GtkComboBoxEntry>.<GtkToggleButton>" style "combo-box-button"
diff --git a/osx/pango.modules b/osx/pango.modules
index 108291e..d981ee2 100644
--- a/osx/pango.modules
+++ b/osx/pango.modules
@@ -1,2 +1,2 @@
-lib/modules/pango-basic-atsui.so BasicScriptEngineATSUI PangoEngineShape PangoRenderATSUI common:
-lib/modules/pango-basic-fc.so BasicScriptEngineFc PangoEngineShape PangoRenderFc latin:* cyrillic:* greek:* armenian:* georgian:* runic:* ogham:* bopomofo:* cherokee:* coptic:* deseret:* ethiopic:* gothic:* han:* hiragana:* katakana:* old-italic:* canadian-aboriginal:* yi:* braille:* cypriot:* limbu:* osmanya:* shavian:* linear-b:* ugaritic:* glagolitic:* cuneiform:* phoenician:* common:
+lib/modules/pango-basic-coretext.so BasicScriptEngineCoreText PangoEngineShape PangoRenderCoreText common:
+lib/modules/pango-basic-fc.so BasicScriptEngineFc PangoEngineShape PangoRenderFc common: