Stephen C North [Fri, 24 May 2019 03:30:48 +0000 (23:30 -0400)]
Merge https://gitlab.com/graphviz/graphviz/merge_requests/1313
Replaced hardcoded ruby-1.9 version with RUBY_VER variable
by Christian Vögl1
For some reason the gitlab pipeline failed and I don't know how
to re-try it.
Brendan Shanks [Wed, 15 May 2019 00:32:31 +0000 (17:32 -0700)]
macOS: Use system-provided icon for 'Attributes' toolbar item in main window (#1535)
Use the system-provided 'i' icon (NSImageNameInfo/'NSInfo') for the Attributes toolbar item.
The previous icon ('InspectorToolbarImage.tif') looks like it came from 10.4's Preview.app, it
doesn't look too bad but there are noticeable differences between it and the current system icon.
Brendan Shanks [Tue, 14 May 2019 23:58:12 +0000 (16:58 -0700)]
macOS: Rename attributes toolbar item images to fix display correctly in dark mode (#1535)
Add 'Template' to the end of the attributes toolbar item image filenames. This causes macOS to treat them as 'template' images, so they display correctly in dark mode.
Brendan Shanks [Tue, 14 May 2019 23:48:29 +0000 (16:48 -0700)]
macOS: Fix colors in Attributes window to work correctly in dark mode (#1535)
Change colors of some interface elements in the Attributes window to display correctly in dark mode on macOS 10.14.
To keep compatibility with old versions, changes made using Interface Builder 3.2.6 running on 10.6.
* For the attribute NSTableView: set the background color from white to the current default 'Control Background Color'
* For the 'key' NSTextFieldCell in the attribute table: set the text color from 'Control Text Color' to 'Text Color', and the background color from 'Control Background Color' to the default 'Text Background Color'. For the text color it would be preferable to use the current default 'Label Color' but that's only available on 10.10 and up
* For the 'value' NSTextFieldCell in the attribute table: set the background color from 'Control Background Color' to the default 'Text Background Color'. The text color is already set to the current default 'Control Text Color'
Adrian Johnson [Mon, 26 Nov 2018 09:43:24 +0000 (20:13 +1030)]
Use cairo mime data to allow reduce the file size of cairo output
The cairo image mime types, eg CAIRO_MIME_TYPE_JPEG, allow
applications to attached the original encoded image file. This allows
cairo backends that support the image encoding to embed the encoded
data directly in the ouptut instead of recompressing the image bitmap
with Flate.
The CAIRO_MIME_TYPE_UNIQUE_ID mime type allows applications to assign
a unique identifer to source surfaces. When surfaces with the same
identifer are used multiple times. The backend can, if supported, only
emit one copy of the image data for mupltiple uses.
Adrian Johnson [Sat, 24 Nov 2018 11:38:37 +0000 (22:08 +1030)]
Use cairo mime data to allow reduce the file size of cairo output
The cairo image mime types, eg CAIRO_MIME_TYPE_JPEG, allow
applications to attached the original encoded image file. This allows
cairo backends that support the image encoding to embed the encoded
data directly in the ouptut instead of recompressing the image bitmap
with Flate.
The CAIRO_MIME_TYPE_UNIQUE_ID mime type allows applications to assign
a unique identifer to source surfaces. When surfaces with the same
identifer are used multiple times. The backend can, if supported, only
emit one copy of the image data for mupltiple uses.
Stephen C North [Fri, 9 Nov 2018 12:29:27 +0000 (07:29 -0500)]
added some missing X11 color names found in freedesktop.org
and enable definition of clusters by setting an attribute in
subgraphs instead of relying on subgraph name prefix.
these features still need to be documented.
The case where malloc() returns NULL was not checked, leading to the return
value always being dereferenced.
In libraries, such allocation functions usually just return NULL on failure and
the caller is expected to check the return value before proceeding. This does
not appear to be the case for the graphviz library, which just calls exit(1),
e.g. in agallocu(). While such behavior can unexpectedly exit(1) any program
using this library, I still opted to use exit(1) instead of returning NULL for
consistency, and because some callers in graphviz always expect these functions
to succeed (not checking the return value). It is better to exit with exit(1)
than with a null pointer dereference error, because at least the atexit() and
similar handlers will be run.