Matthias Clasen
4e05148bef
Simplify some code
...
Deal with the min-width/min-height fallback the same way
as in GtkBuiltinIcon.
2015-12-16 13:53:13 -05:00
Benjamin Otte
26d42771ef
progressbar: Change the way the progress gadget gets size
...
Size of the progress element now grows also when it's close to 0 size.
Previously the size was clamped to the minimum size, now it starts
growing from the minimum size.
So for a 100px trough with a 10px min size progress, the sizes of the
progress element change like this:
old new
0% 10 10
5% 10 14
10% 10 19
20% 20 28
50% 50 55
100% 100 100
2015-12-16 01:50:01 +01:00
Matthias Clasen
fffa84b843
progressbar: Convert to gadgets
...
Use gadgets for the text, the trough and the progress.
2015-12-15 08:41:16 -05:00
Benjamin Otte
971a277419
cssnode: Change style-changed signal
...
Instead of having old and new style, now have a GtkCssStyleChange opaque
object that will compute the changes you are interested in for you.
This simplifies change signal handlers quite a bit and avoids lots of
repeated computation in every signal handler.
2015-12-12 02:16:04 +01:00
Matthias Clasen
43f822e70f
Annotate deprecated style properties
...
Use G_PARAM_DEPRECATED with deprecated style properties.
This will make it easier to identify and remove such stale
properties from css, since it will now trigger warnings.
2015-11-16 15:13:33 -05:00
Matthias Clasen
c6d5accf9c
progressbar: Ignore x/yspacing style properties
...
These are not really useful, so ignore and deprecate them.
2015-11-16 07:20:18 -05:00
Matthias Clasen
3007ad6f3b
Cosmetic: Avoid explicit state variables
...
Using the state of the context makes this more obviously correct.
2015-11-14 12:32:57 -05:00
Matthias Clasen
9d4c78c2d0
progressbar: Add a CSS node for trough
...
This is better, since the trough doesn't fill up the allocation
entirely.
2015-11-04 12:32:15 -05:00
Matthias Clasen
332ea5f8ec
progressbar: Add diagrams to CSS documentation
2015-11-03 14:27:35 -05:00
Matthias Clasen
479d64e89a
progress bar: Add CSS documentation
2015-10-31 20:30:15 -04:00
Matthias Clasen
73704d98cc
progressbar: Convert to CSS nodes
...
Use the element names progressbar and progress.
2015-10-31 20:20:13 -04:00
Matthias Clasen
bfe141c011
progressbar: Convert to g_object_notify_by_pspec
...
This avoids pspec lookup overhead in g_object_notify.
2015-09-06 17:11:35 -04:00
Matthias Clasen
eb715c3118
GtkProgressBar: Adjust docs to new style
...
Don't talk about superimposed text, since we don't do that
anymore.
https://bugzilla.gnome.org/show_bug.cgi?id=748784
2015-05-07 22:07:41 -04:00
Lars Uebernickel
ada97b0928
gtkprogressbar: fix size allocation
...
As of 74405cc
, progress bars use a new design with values drawn on top
(or to the left) of the through instead of inside of it. This change
brought a number of regressions: the min-horizontal-bar-height and
min-vertical-bar-width style properties are not respected anymore. For
vertical progress bars, the value was drawn too close to the bar and not
centered vertically.
Fix this by respecting the style properties and drawing the value label
at the correct position.
Also, the xspacing and yspacing properties didn't server any apparent
purpose. Change their semantics to mean "the spacing between the label
and the bar". Hence, they only need to be added to the size request when
showing the label. Since we are changing semantics anyway, reduce their
default values from 7 to 2, to avoid and excessive gap.
https://bugzilla.gnome.org/show_bug.cgi?id=746688
2015-03-28 19:00:06 -04:00
Benjamin Otte
3534225c76
progressbar: Make the trough the default element
...
Gets rid of a bunch of save/restore calls and allows animating the
background (but not the slider, booo!)
2014-10-13 04:39:58 +02:00
Matthias Clasen
67b4f8ea75
GtkProgressBar: Mark the default text for translation
...
At the same time, use a small space before %.
This matches what is done in GtkCellRendererProgress.
https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Benjamin Otte
b5a8b7ef3b
widget: Make _gtk_set_simple_clip() take an optional content clip
2014-08-21 00:54:07 +02:00
Benjamin Otte
6c06bd55da
gtk: Don't use gtk_render_activity()
...
... in places where we draw a background. This was changed for GTK 3.0.0
to allow animations, but these days it doesn't make sense anymore to use
gtk_render_activity() for backgrounds.
2014-08-16 16:34:14 +02:00
Matthias Clasen
a9201b8379
GtkProgressBar: Add style classes for edges
...
Add left/right/top/bottom style classes according to which edge(s)
of the progressbar the progress is adjacent to. Only for a fraction
of 1.0 will we set more than one edge.
2014-07-19 00:40:09 -04:00
Matthias Clasen
18a92992a0
GtkProgressBar: Set orientable style classes initially
...
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:39:11 -04:00
Matthias Clasen
c2907b8532
GtkProgressBar: implement clipping
...
This allows progress bars to have shadows.
https://bugzilla.gnome.org/show_bug.cgi?id=733361
2014-07-18 16:32:46 -04:00
Matthias Clasen
f446ffdd5d
GtkProgressbar: Use G_PARAM_EXPLICIT_NOTIFY
2014-06-09 13:31:07 -04:00
William Jon McCann
74405cc964
Update the design for progress bars
...
We now use a narrower trough and paint the optional text
beside the trough instead of inside it. This makes for a much
cleaner appearance and more readable text.
2014-05-07 09:56:35 -04:00
William Jon McCann
469d333aa2
docs: use Returns: consistently
...
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
e34bd4137d
docs: use apostrophes in *n't
2014-02-07 13:32:47 -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
2a45418b67
docs: use proper quotes
2014-02-05 15:08:42 -05:00
Matthias Clasen
10cd226dfe
Progress bar: Handle 'no more pulse'
...
Before smooth animation, stopping the pulse would abruptly stop
the bouncy bar. This change makes it so that we slow down for
a bit, and then stop.
2013-11-11 07:24:35 -05:00
Matthias Clasen
eae9513cbd
Make activity mode progress bars animate better
...
Use a tick callback and move the block each frame, instead
of making it jump only when gtk_progress_bar_pulse() is called.
2013-11-10 01:20:27 -05: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
Benjamin Otte
b39bb4400e
progressbar: Store activity position as percentage
...
... instead of in absolute pixels.
2012-12-29 01:00:15 +01:00
Benjamin Otte
02b440b466
progressbar: Remove activity_step from private struct
...
It's only used locally, so use a local variable
2012-12-29 01:00:15 +01:00
Benjamin Otte
7747910b9d
gtk: Use context's font
...
Instead of using gtk_style_context_get_font() in
pango_context_get_metrics(), use pango_context_get_font_description().
The context contains the font description we are about to use after all.
2012-12-06 02:57:18 +01:00
Cosimo Cecchi
f70fc49ebc
docs: fix a number of typos and obsolete references
2012-07-02 10:41:11 -04:00
Javier Jardón
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
Philip Withnall
5df87d06d4
progressbar: Tidy up the gtk-doc comments a little
2012-01-21 10:05:10 +00:00
Rui Matos
f4c698ef93
Revert "progressbar: Set state flags on draw"
...
This reverts commit 6ed5918718
which is no
longer needed as the style context now has the state flags updated when going
into draw.
2011-12-19 20:59:06 +00:00
Rui Matos
6ed5918718
progressbar: Set state flags on draw
...
We were missing setting state flags on the style context before drawing.
2011-12-07 22:42:56 +00:00
Alexander Larsson
ca829b484c
Add pulse style class and use in progress bar and entry
...
This is used for indeterminate progress reporting.
2011-11-18 10:15:04 +01:00
Matthias Clasen
242b1f12f8
GtkProgressbar: respect the range of 'fraction'
...
The setter should not set the property to values outside the allowed
range.
https://bugzilla.gnome.org/show_bug.cgi?id=663825
2011-11-11 10:36:09 -05:00
Philip Withnall
0b4d8433d4
Bug 654266 — No longer possible to set empty text on a GtkProgressBar
...
Change the semantics of GtkProgressBar:text slightly so that it behaves as
it did before GTK+ 3.
Closes: bgo#654266
2011-07-23 00:09:30 +01:00
Philip Withnall
fd705ce7c7
progressbar: Fix a signed/unsigned comparison
2011-07-18 19:35:02 +01:00
Matthias Clasen
a166051b60
Convert GailProgressBar to GtkProgressBarAccessible
2011-07-05 16:08:53 -04:00
Javier Jardón
bf0d8402f5
gtk: Use const instead G_CONST_RETURN
2011-06-10 13:07:54 +01:00
Cosimo Cecchi
579afaa9a1
progressbar: fetch the padding without the trough style class
...
This is consistent with the rest of the widget, which uses only one
padding value.
https://bugzilla.gnome.org/show_bug.cgi?id=649593
2011-05-06 15:10:43 -04:00
Matthias Clasen
e564d36deb
GtkProgressBarPrivate: Improve struct packing
...
Also remove the unused blocks and in_block members.
2011-04-12 12:40:30 -04:00
Benjamin Otte
8343831c39
progressbar: remove needless is_drawable() check before queue_resize()
2011-03-29 15:33:27 +02:00
Matthias Clasen
4a0aa41742
Add gtkorientableprivate.h header
2011-01-30 03:12:49 -05:00
Carlos Garnacho
e2e7075533
Redo patch in efae64b
(Set vertical/horizontal class...)
...
Add a _gtk_orientable_set_style_classes() function so all
orientation changes to style happen in a single place.
2011-01-12 22:58:41 +01:00
Carlos Garnacho
efae64be66
Set vertical/horizontal class on all widgets overriding GtkOrientable::orientation
...
This is so g_object_set() on that property leaves widgets' style in
a meaningful state. Fully fixes bug 639157.
2011-01-12 22:28:43 +01:00