e7a23eaaa8
Use snprintf instead of std::stringstream when converting color values to strings
...
std::ostream/stringstream will use the current locale to determine the numeric
formatting. If the locale uses grouping then thousands separators will be
inserted in the output which produces an invalid color string in
UIConfiguration::reset_gtk_theme() and when converting colors to strings in
UIConfiguration::store_color_theme()
This has not been a problem so far because it appears that LocaleGuard does not
reset the LC_NUMERIC value for the global C++ locale. So if a LocaleGuard is
created at any time before these functions are called(even if it goes out of
scope) the numeric formatting used by std::streams will use the "C" locale
formatting facets.
2017-04-19 09:36:59 +10:00
b00b83f95a
Use XMLNode::set_property API in UIConfiguration class
2017-04-19 09:36:57 +10:00
2b58bbd50a
Use PBD string conversion functions in PBD::ConfigurationVariable
...
No longer need a specialization for bool as PBD::to_string/string_to already
has specializations for bool
Remove template specialization for float as string_to/to_string handles string
representations of infinity
2017-04-19 09:36:47 +10:00
3dbdc4d837
Leave some notes about memory-leaks
2017-01-20 13:54:12 +01:00
1d2a76f239
Free some one time alloc of the UI (cleaner valgrind output)
...
No incremental leaks here..
* downcase (const char*) uses strdup, caller needs to free
* free allocated cursors when the editor is destroyed
* drop static editor lua-instance & bindings
* delete allocated gtk image/icons
2017-01-20 13:53:37 +01:00
5ec21347a9
Don't include program-name with <Option name="color-file" />
...
This allows for e.g. mixbus and mixbus32c to share the config, but
use different color-files at runtime.
2016-11-27 21:54:28 +01:00
01ac1b5362
Merge set_pango_fontsize() into reset_dpi()
...
… since reset_dpi() is the only caller.
2016-08-21 15:04:06 +02:00
56c4b3c9b0
turn back towards color theme files ALWAYS including the program name. also load both default and user colors (if present)
2016-07-18 11:50:38 -04:00
cf52d6e4b4
enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
2016-07-14 14:45:23 -04:00
9da43c5ceb
UIConfig needs C numeric locale while setting GTK color theme
2016-07-14 11:37:48 -04:00
68b6d0d796
fix some more thinkos related to user color file management
2016-06-21 19:39:13 -04:00
d3a0355b55
tweaks to how UIConfiguration::color_file_name() operates
2016-06-21 19:26:05 -04:00
b708439307
fix user color file name
2016-06-08 15:51:33 +02:00
9c69d6f0c3
show color theme file search path when a file is not found
2016-05-31 15:59:14 -04:00
6ec731c5fa
rework of color theme file management
...
Use program-name + version when saving user color files (and search for them)
Preset XML-defined theme name, but use filename in config files (could be wrong).
2016-05-31 15:30:46 -04:00
cb4b6bf8a3
remove debug output
2016-05-31 15:30:45 -04:00
4c60a925c0
the return of the theme selector, plus 3 new themes from cooltehno
2016-05-31 15:30:45 -04:00
2f9d5077dc
GUI part of LocaleGuard optimization.
2016-05-07 17:17:41 +02:00
6d343ba3c6
fix LocaleGuard contstructor ( 3dc77280
)
2016-05-07 12:19:41 +02:00
3dc7728038
we always only use the "C" locale when saving.
2016-05-05 21:49:56 +02:00
17ace643e4
OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one)
2016-05-04 23:09:45 -04:00
2397429e99
use quotes for in-tree pbd/glib wrapper include
2015-10-05 22:15:18 +02:00
22b07e0233
NOOP, remove trailing tabs/whitespace.
2015-10-05 16:17:49 +02:00
f27800ea41
use pbd's gstdio compatibility wrapper (GUI)
2015-09-17 14:38:09 +02:00
6b019a4953
Move UIConfiguration Singleton into UIConfiguration header
...
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
45d487f16e
Move ARDOUR_UI::ui_scale into UIConfiguration class
2015-09-16 16:55:17 -04:00
c99bf353a5
Remove inclusion of ardour_ui.h from ui_config.cc
2015-09-16 16:55:17 -04:00
fc1e7dbb55
Move DPIReset and ColorsChanged signals into UIConfiguration
2015-09-16 16:55:17 -04:00
2d47183dc9
Move util functions into UIConfiguration as they depend on it anyway
2015-09-16 16:55:17 -04:00
fdcc209354
remove unused variable
2015-09-15 21:21:09 +02:00
c6e0c8430f
image-surface/software rendering as preference
2015-09-07 13:35:11 +02:00
48c4ad8004
only use and present the buggy gradient parameter if built with a suitably patched version of Cairo
2015-05-28 13:27:38 -04:00
173b007779
rearrange and redesign UIConfiguration/ARDOUR_UI APIs to allow correct initialization.
...
We need to be able to set an environment variable *before* gtk_init() is called, but also to
load the color theme right after gtk_init() and before the rest of the GUI is created.
2015-05-28 12:46:43 -04:00
d2fa2450aa
use C locale, because POSIX locale is not supported on windows, and operation is undefined. C works on all platforms
2015-01-19 07:29:25 -06:00
35537aac69
fix color parsing on 32bit systems
2014-12-22 04:48:32 +01:00
e0cb9efb00
Various color tweaks.
...
This commit changes some color names, nuke your theme. This isn't quite ideal
yet, but takes some steps towards where I think things should go aesthetically:
Make automation tracks/regions colors correspond to their parent's type.
Make selected MIDI notes outlined in red like most everything else, and scrap
separate min/mid/max fill colors for selected MIDI notes.
Color automation ghost MIDI notes based on original note color.
Try to kill 90's looking brightish gray gradients in general.
2014-12-16 00:05:45 -05:00
a5aa2df6fc
add localeguard to read floating point values correctly when loading theme modifiers
2014-12-15 13:30:56 -05:00
8b23001441
add editor to Theme Manager for modifiers
2014-12-15 12:07:05 -05:00
dc934ab90d
Add UIConfiguration::color_mod (colorname, modifiername) to get a modified color
2014-12-15 09:04:41 -05:00
ef26a862e9
add missing UIConfiguration::modifier()
2014-12-14 23:48:20 -05:00
83326a06ca
basic code to use SVModifier plus one definition in dark.colors
2014-12-14 23:34:59 -05:00
59f32dc80f
remove base color concept from UIConfiguration and ThemeManager.
...
What used to be "relative colors" (defined relative to base colors) are now defined
in absolute terms.
2014-12-14 16:14:18 -05:00
48a7a11974
initial pass to replace all UIConfiguration::get_XXXXXX() calls with UIConfiguration::color(name).
...
IMPORTANT: names have not been downcased and spaced yet, so many colors are not found
2014-12-14 12:27:07 -05:00
e19e05fc59
hide a lot of color debugging noise
2014-12-12 15:27:32 -05:00
bd430c2080
allow UIConfiguration::color() to tell caller that it could not find the named color
2014-12-11 17:03:52 -05:00
0bb8e80f87
more tweaking of color management.
...
User's own modification to NAME.colors are stored in $CONFIG/my-NAME.colors now.
2014-12-08 22:02:38 -05:00
9ac551abab
another metric ton of color work
2014-12-08 22:02:38 -05:00
624a86c39d
lots more color work, closer and closer to being ready for ... being taken apart again
2014-12-08 22:02:38 -05:00
74becec17f
change GTK rc file system to use just a single file, which is color-neutral.
...
* packaging scripts need modification
* light theme file left in place to help with possible generation of alternate theme
2014-12-08 22:02:38 -05:00
aff8a806a2
more color work, including removing rgba{_p_}_from_style()
2014-12-08 22:02:38 -05:00