Commit Graph

164 Commits

Author SHA1 Message Date
Matthias Clasen
2f544655f9 Revise CSS node documentation
Clarify the use of brackets in the CSS node diagrams:
[] means optional nodes or classes, <> means child widgets.
2015-12-16 10:58:47 -05:00
Timm Bäder
591e7f5ef8 GtkScale: Add missing nullable annotations 2015-12-02 21:06:11 +01:00
Matthias Clasen
60c7893c14 scale: Document the new CSS nodes 2015-11-06 22:27:31 -05:00
Matthias Clasen
8d886f3513 Cosmetic: Use defines for style classes 2015-11-06 11:50:23 -05:00
Matthias Clasen
76fbcc2f26 range: Document fine-tuning style class use 2015-11-06 11:50:23 -05:00
Matthias Clasen
bfee2d3c61 scale: Stop using style classes for marks
We can use :first/last-child for this now.
2015-11-06 07:01:42 -05:00
Matthias Clasen
07841f269d scale: Split marks node into two
Use separate CSS nodes for the marks above and below the trough.
2015-11-05 07:26:10 -05:00
Matthias Clasen
2bfb5ad812 range: Add a CSS node for the trough
This is in sync with what we do elsewhere for troughs.
2015-11-05 07:26:10 -05:00
Matthias Clasen
0024358c91 scale: Fix a crash
We can only free the marks_node if there is one.
2015-11-03 23:35:32 -05:00
Matthias Clasen
8727c8fe24 range: Convert to CSS nodes
Use CSS nodes for GtkScale and GtkScrollbar. See their documentation
for details on what subnodes with what names exist.
2015-11-03 23:17:09 -05:00
Matthias Clasen
ea241c691c scale: Drop unneeded private exports
Nobody outside gtkscale.c is using these functions, so make
them static.
2015-09-23 07:01:15 -04:00
Matthias Clasen
dfe1c63c9b scale: Convert to g_object_notify_by_pspec
This avoids pspec lookup overhead in g_object_notify.
2015-09-06 17:11:36 -04:00
Matthias Clasen
1ed21ad3d4 GtkScale: More work on mark spacing
Try harder not to push the scale out of balance by marks. With
this change, the remaining difference in the drawing is down
to asymmetric assets and margins coming out of the theme.
To fully support such asymmetric rendering, we need implement
baseline alignment for scales.

https://bugzilla.gnome.org/show_bug.cgi?id=749650
2015-06-23 09:36:14 -04:00
Matthias Clasen
3d82fc6d7e GtkScale: Move marks inward
We don't want scale marks to affect scale sizing and positioning,
so draw them inside the range recangle. This avoids size changes
for marks that don't have labels, at least.

https://bugzilla.gnome.org/show_bug.cgi?id=749650
2015-06-04 19:58:40 -04:00
Matthias Clasen
374f96625f GtkScale: Use the new helpers
Instead of issuing g_warning, fill the provided GError.
This lets us test this error handling, and is the right
thing to do. Use the new GtkBuilder helpers and
g_markup_collect_attributes to do so.
2015-04-27 01:15:22 -04:00
Carlos Soriano
0504328bd8 gtkscale: Draw smaller marks
As a design request, use smaller marks.

https://bugzilla.gnome.org/show_bug.cgi?id=741117
2014-12-05 13:23:05 +01:00
Benjamin Otte
79712f843c scale: Always be flippable
GtkRange only flips horizontal ranges, so there's no need to unset it
for vertical scales.

Also, set_flippable() is a cute name.
2014-11-25 19:19:12 +01:00
Benjamin Otte
51f5433170 range: Deprecate detail strings in class struct
... and stop setting them.
2014-11-25 19:19:12 +01:00
Matthias Clasen
1740663584 GtkScale: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:07 -04:00
Cosimo Cecchi
d0b8ef3a6f scale: remove unused code 2014-05-09 11:02:43 -07:00
Matthias Clasen
fee33b1a81 Clean up private headers
This commit adds a few missing private headers, and cleans up
some irregularities in the existing ones
2014-04-05 02:06:29 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
285d216d3e docs: use apostrophe in *'ll 2014-02-07 13:35:54 -05:00
William Jon McCann
f0000b2f3d docs: use more apostrophes 2014-02-07 13:26:12 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
Matthias Clasen
09d1b28249 docs: Convert to markdown
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
Matthias Clasen
2f1fa7cdc3 Drop some unnecessary includes
Drop includes of deprecated headers where they are
no longer needed.
2013-07-19 22:32:23 -04:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Matthias Clasen
e9f182e37a Fix a few memory leaks wrt to translations
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=699016
The fix here is slightly different. We make
_gtk_builder_parser_translate return a const char * instead of
a dup'ed string, and fix up the callers.
2013-04-28 21:43:49 -04:00
Tristan Van Berkom
38dc4733c0 GtkScale: Properly chain up in GtkBuildableIface->custom_finished()
This was causing <style> markup to be ignored when specified
on GtkScale types.
2013-04-08 21:18:47 +09:00
Cosimo Cecchi
26ea8e710a scale: render scale mark lines with separator style class
So that the theme can distinguish them from the mark text.
2012-12-07 11:41:03 -05:00
Cosimo Cecchi
ad22a1faf6 scale: update style properties on GtkRange at init
Same fix as in ef027c93d4, but for
the GtkScale subclass of GtkRange.

https://bugzilla.gnome.org/show_bug.cgi?id=686280
2012-10-22 13:13:11 -04:00
Benjamin Otte
2353d60b8a types: Move GtkAdustment declaration to gtktypes.h
... and make all the headers to not include gtkadjustment.h anymore. Of
course, also include it in the source files instead.
2012-03-03 19:45:03 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
1839caa7b7 GtkScale Remove an unused variable 2012-01-18 11:06:33 -05:00
Matthias Clasen
345d865ac6 GtkScale: Fix late setting of marks 2012-01-18 00:58:38 -05:00
Matthias Clasen
57126ae56b GtkScale: Always chain up in notify
Pointed out by Stefan Sauer.
2012-01-16 18:05:44 -05:00
Matthias Clasen
eb4a685691 GtkScale: Fix marks for inverted scales
Problem pointed out by Stefan Sauer in bug 667598. The solution
here is different from his patch. We always draw marks in increasing
direction, and flip the marks and stop positions to match.
2012-01-15 14:13:10 -05:00
Matthias Clasen
800e605cb3 GtkScale: remove an unused argument
All callers were passing 1 for 'match', so just get rid of it.
Patch provided by Stefan Sauer, in bug 667590.
2012-01-15 14:13:10 -05:00
Stefan Sauer
9bedf0128f scale: use a GList instead of a GSList
The range widget can be inverted, this will help us to handle that case.
2012-01-15 14:13:10 -05:00
Stefan Sauer
f7d3ca46f7 gtkscale: fix bogus compare func
The GtkScaleMark values are gdouble, a simple a-b compare func would fail for
values with the same integer value. This breaks the sorting and causes random
marker label placement.
2012-01-09 18:33:11 +01:00
Rui Matos
95caabac03 scale: Stop setting state flags on the style context for drawing 2012-01-09 16:31:11 +00:00
Cosimo Cecchi
cfa0339559 scale: remove unused variable 2011-12-15 12:16:09 +01:00
Andrea Cimitan
40423df234 Add has-origin property for GtkScale
If the scale has an origin (it will have one by default), GtkRange will
render the two sides before/after the current value with different style
classes, making it possible for themes to use different colors and
properties for the two areas.
This was possible in GTK 2 with style details, but got lost during the
road to 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=665140
2011-12-14 17:16:09 +01:00