From 4067bd81444736ddd7047210e2afdaaf9eaeaf40 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 9 Jan 2015 20:05:06 +0000 Subject: Fix OSX integration. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5504 a436a847-0d15-0410-975c-d299462d15a1 --- osx/Info.plist.in | 8 ++ osx/bundleify.sh | 25 +++-- osx/fonts.conf | 150 ----------------------------- osx/gtkrc | 275 ++++++++++++++++++++++++++++++++++++++++++++---------- osx/pango.modules | 4 +- 5 files changed, 251 insertions(+), 211 deletions(-) delete mode 100644 osx/fonts.conf (limited to 'osx') 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 @@ DYLD_LIBRARY_PATH lib + GTK_PATH + lib + FONTCONFIG_FILE + Resources/fonts.conf + PANGO_RC_FILE + Resources/pangorc + GTK2_RC_FILES + Resources/gtkrc 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 @@ - - - - - - - - - - ~/Library/Fonts - ~/.fonts - /Library/Fonts - /System/Library/Fonts - - - - ~/.fontconfig - - - - - mono - - - monospace - - - - - - - sans serif - - - sans-serif - - - - - - - sans - - - sans-serif - - - - - conf.d - - - - - 0x0020 - 0x00A0 - 0x00AD - 0x034F - 0x0600 - 0x0601 - 0x0602 - 0x0603 - 0x06DD - 0x070F - 0x115F - 0x1160 - 0x1680 - 0x17B4 - 0x17B5 - 0x180E - 0x2000 - 0x2001 - 0x2002 - 0x2003 - 0x2004 - 0x2005 - 0x2006 - 0x2007 - 0x2008 - 0x2009 - 0x200A - 0x200B - 0x200C - 0x200D - 0x200E - 0x200F - 0x2028 - 0x2029 - 0x202A - 0x202B - 0x202C - 0x202D - 0x202E - 0x202F - 0x205F - 0x2060 - 0x2061 - 0x2062 - 0x2063 - 0x206A - 0x206B - 0x206C - 0x206D - 0x206E - 0x206F - 0x3000 - 0x3164 - 0xFEFF - 0xFFA0 - 0xFFF9 - 0xFFFA - 0xFFFB - - - - 30 - - - - 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 "*." 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 "*." 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 "**" style "menu" +widget_class "**" style "menu-item" +widget_class "*" style "menu-separator" +/*widget "*.gtk-combobox-popup-menu*" style "combo-box-menu"*/ +widget_class "*.*" style "treeview" +widget_class "*.GtkTreeView.GtkButton" style "tree-header" +widget_class "*..*" style "combo-box" +widget_class "*.." style "combo-box-button" +widget_class "*.." 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: -- cgit v1.2.1