Re: gtk3 (GtkTextView) and MacOS
- From: Jim Charlton <charltn gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: gtk3 (GtkTextView) and MacOS
- Date: Wed, 25 Feb 2015 09:45:50 -0800
I had a similar problem with gtk3 and gtkmm3 programs on MacOS X
(Yosemite) and Linux (Ubuntu). I am using jhbuild to install the
gtk/gtkmm libraries on the Mac. The UI looks fine on Linux but not so
good on the Mac. The problem appears to be the "theme".
On linux (Ubuntu), using libgtkmm-3.0-dev, compiled programs can have
their themes changed with Tweak Tool. Having chosen the Ambiance theme,
I can edit /usr/share/themes/Ambiance/gtk-3.0/gtk.css to "@import
url("gtk-main.css");" and then edit
/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css to customize the theme.
I found (eventually) that I could do the same on the Mac if I set the
environment variable
XDG_CONFIG_HOME=/path/to/theme/gtk-3.0/ (I am not sure where your themes
are installed using MacPorts. Perhaps /usr/share/themes/Ambiance or
whatever).
prior to executing the program. The selected (and perhaps edited) theme
is then used over the embedded default.
If memory serves me correctly... I was able to copy themes from Linux to
the Mac and use them.
jim... JIm Charlton
On 15-02-24 11:18 PM, Roger Davis wrote:
Hi all,
I have an application suite built on gtk3 which is targeted at both
Linux (specifically CentOS 6 and 7) and MacOS X (Yosemite). Although
the software is usable under MacOS I am having an ugly cosmetic
problem there with my GtkTextView widgets, and other visual details
are also not consistent with CentOS Linux. I suspect this is due to an
incomplete or misconfigured gnome3 theme/font installation under
Yosemite. (I am using the MacPorts gtk3/gnome packages.) I am hoping
that someone here can give some advice on what gnome3 packages I need
to install and configure to at least solve my GtkTextView problem.
Under Linux my GtkTextView widgets display text nicely with consistent
and adequate spacing between successive lines of text. There appears
to be a very consistent 2 or 3 pixels of white space between the
lowest descenders of line N and the highest ascenders of line N+1.
Under MacOS, however, the descenders from line N actually touch the
ascenders of line N+1 and the text is thus hard to read. Furthermore,
line spacing is not always consistent -- lines with the unicode
sequence \342\206\222 (right-arrow) have 2 or 3 pixels of additional
inter-line spacing after the preceding line. (That spacing is actually
perfect, but I want it for *every* line.)
There appear to be no relevant gtk_text_view_XXX() functions
controlling inter-line spacing, so I assume this problem is all about
something that is broken with my gnome3 theme and/or font installation
under MacOS. Does anyone have any idea of what this might be?
I would very much prefer to configure a gnome3 installation under
MacOS that is as lightweight as possible. No gtk3 apps other than my
own are running, and I don't want to force users to have to cope with
the gnome3 UI any more than is necessary, although if there was a way
for them to select their own theme (especially with regard to font
sizing within GtkTextView and other dialog panel widgets) that would
be a big plus. Another reason for a lightweight gnome3 environment is
that I've so far been unable to even install the full MacPorts gnome3
package set (due to a problem with the mojs17 port which seems to be a
required dependency for many of the gnome3 packages), and I've read
that many people who did manage to install a full-featured gnome3
under MacOS never got it to operate.
Following is a list of gtk3- and gnome-related MacPorts packages which
are now installed on my system, and which are clearly sufficient to
build my software and run it, albeit with these annoying cosmetic issues:
port list installed | grep gnome
adwaita-icon-theme @3.14.1 gnome/adwaita-icon-theme
at-spi2-atk @2.14.1 gnome/at-spi2-atk
at-spi2-core @2.14.1 gnome/at-spi2-core
gnome-backgrounds @3.14.1 gnome/gnome-backgrounds
gnome-icon-theme @3.12.0 gnome/gnome-icon-theme
gnome-themes-standard @3.14.0 gnome/gnome-themes-standard
gobject-introspection @1.42.0 gnome/gobject-introspection
gtk2 @2.24.25 gnome/gtk2
gtk3 @3.14.5 gnome/gtk3
hicolor-icon-theme @0.14 gnome/hicolor-icon-theme
icon-naming-utils @0.8.90 gnome/icon-naming-utils
libcroco @0.6.8 gnome/libcroco
Can anyone recommend any other packages which are necessary to get my
GtkTextView objects to display better-looking text? Is there any
necessary user-environment configuration, e.g., environment variables
or config files stashed in ~ or elsewhere? (I did try copying the
~/.config directory from a CentOS 7 system with a functional
full-blown gnome3 environment, but that didn't make any difference.)
Are there any gnome3-related system processes which must be running
before I start a gtk3 app if I want the latter to conform to any
particular theme, etc.? I am starting my apps simply by invoking them
directly from a MacOS Terminal, which then implicitly starts XQuartz
(2.7.7). I've made no effort to specifically launch any gnome3-related
system process other than the following commands which were
recommended by the MacPorts installation chatter at gtk3 package
installation time:
% sudo launchctl load -w
/Library/LaunchDaemons/org.freedesktop.dbus-system.plist
% launchctl load -w
/Library/LaunchAgents/org.freedesktop.dbus-session.plist
Any ideas? Thanks!
Roger Davis
Univ. of Hawaii
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]