summaryrefslogtreecommitdiff
path: root/gtk/gtklevelbar.c
Commit message (Collapse)AuthorAgeFilesLines
* level bar: Don't leave css nodes behindMatthias Clasen2016-03-011-1/+4
| | | | | | We create and destroy gadgets inside the levelbar hierarchy here, and if we don't explicitly remove their CSS nodes from the parent, they stick around.
* levelbar: Avoid a use-after-freeMatthias Clasen2016-02-261-2/+4
| | | | | | We were freeing the old offset before using its name to recreate a new one. Don't do that. Found by gcc's undefined behavior sanitizer.
* level bar: Document buildable syntaxMatthias Clasen2016-02-071-1/+7
|
* level bar: Fix offset behaviorMatthias Clasen2016-02-061-9/+11
| | | | | | | | We had some odd special-casing for the lowest and highest offset that did not quite work. The new rule is simple: If the value is between offset n-1 and n, it gets the style for offset n. https://bugzilla.gnome.org/show_bug.cgi?id=761416
* level bar: Improve documentationMatthias Clasen2016-02-061-0/+10
| | | | | | The docs were not explaining at all what happens to existing level offsets when the min- or max-value of a level bar are changed.
* level bar: Make the full offset officialMatthias Clasen2016-02-061-4/+5
| | | | | We are adding 3 offsets, not just two. Add a define for the third one, and mention it in the docs.
* levelbar: Make discrete levelbars behave as beforeMatthias Clasen2016-02-051-2/+8
| | | | | | | | | During the gadget conversion, the drawing of discrete levelbars was unintentionally changed to draw a wide trough but narrow blocks, which does not look great. So go back to the previous way of drawing things. https://bugzilla.gnome.org/show_bug.cgi?id=761428
* levelbar: Document CSS node orderingMatthias Clasen2016-01-221-0/+3
|
* Use convenience API that was introduced recentlyMatthias Clasen2016-01-131-4/+3
| | | | | Use gtk_css_gadget_set_state in all the places where we previously were getting a node from a gadget, just to call gtk_css_node_set_state.
* levelbar: loop over all block gadgets to determine min sizeCosimo Cecchi2016-01-041-17/+29
| | | | | Instead of just picking the first. This is because the theme might set a border on only one of them, like the HighContrast theme does.
* levelbar: fix parameter confusionCosimo Cecchi2016-01-041-1/+1
| | | | We're always interested in the minimum size.
* levelbar: consolidate code into single functionCosimo Cecchi2016-01-031-14/+13
|
* levelbar: port to use gadgetsCosimo Cecchi2016-01-031-259/+218
| | | | We now use one gadget for the trough, and one for each block.
* levelbar: split out a functionCosimo Cecchi2016-01-031-11/+12
|
* levelbar: fix a crashCosimo Cecchi2016-01-021-0/+2
| | | | | We should not try to access a block with an index that exceeds the number of blocks in the widget.
* Revise CSS node documentationMatthias Clasen2015-12-161-2/+2
| | | | | Clarify the use of brackets in the CSS node diagrams: [] means optional nodes or classes, <> means child widgets.
* cssnode: Change style-changed signalBenjamin Otte2015-12-121-16/+4
| | | | | | | | 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.
* Chain up in state_flags_changedBenjamin Otte2015-12-021-0/+2
| | | | | When introducing handlers for state_flags_changed in the node transitions, chaining up was forgotten.
* levelbar: Use more CSS nodesMatthias Clasen2015-11-131-186/+233
| | | | Create as many CSS nodes as we're rendering blocks on the screen.
* gtklevelbar: Fix typoTimm Bäder2015-11-111-1/+1
|
* levelbar: Port to use CSS nodesMatthias Clasen2015-11-111-92/+165
| | | | | | Use element names levelbar, trough, block, and some style classes on the block nodes: .discrete, .continuous, .empty, .level-low, etc.
* Intern all signal names beforehandMatthias Clasen2015-09-121-1/+1
| | | | This avoids pointless allocations
* GtkLevelBar: Use the new helpersMatthias Clasen2015-04-271-54/+47
| | | | | | | 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.
* levelbar: don't use the current value style class for empty blocksCosimo Cecchi2014-10-271-2/+15
| | | | | | | | We want to be able to style the empty blocks independently of all the offset styles, so remove the current style class when painting an empty block. https://bugzilla.gnome.org/show_bug.cgi?id=707695
* widget: Make _gtk_set_simple_clip() take an optional content clipBenjamin Otte2014-08-211-1/+1
|
* GtkLevelBar: implement clippingMatthias Clasen2014-07-181-0/+11
| | | | So level bars can have shadows, too.
* GtkLevelBar: Use G_PARAM_EXPLICIT_NOTIFYMatthias Clasen2014-06-091-17/+14
|
* levelbar: Remove unneeded checksBenjamin Otte2014-05-011-8/+4
| | | | | Size vfuncs always get non-null out variables passed, so no need to check for NULL.
* docs: use Returns: consistentlyWilliam Jon McCann2014-02-191-1/+1
| | | | Instead of Return value:
* docs: fully break lines in examplesWilliam Jon McCann2014-02-121-12/+18
| | | | | | | | | Try to do a better job of keeping example content from being too wide. It is often rendered as <pre> text so the only time we can wrap it is in the source. It is best to full break lines at all punctuation and to try to keep the width under 70 chars or so.
* docs: use proper apostropheWilliam Jon McCann2014-02-071-2/+2
| | | | https://wiki.gnome.org/Design/OS/Typography
* docs: use ` instead of <literal>William Jon McCann2014-02-041-1/+1
|
* docs: replace all <examples> with markdown headingsWilliam Jon McCann2014-02-041-3/+2
|
* docs: Identify examples that are C codeWilliam Jon McCann2014-01-291-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* docs: use |[ ]| instead of <programlisting></programlisting>William Jon McCann2014-01-291-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=723119
* docs: fix typo in property nameWilliam Jon McCann2014-01-211-1/+1
|
* Improve struct packing in various placesMatthias Clasen2013-09-211-2/+2
|
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-9/+9
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* Add accessibility for GtkLevelBar and value testMike Gorse2013-02-011-0/+4
|
* level-bar: Fix typoStefano Facchini2012-10-171-1/+1
|
* level-bar: add support for RTL localesStefano Facchini2012-10-171-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=684288
* level-bar: add an "inverted" property like GtkProgressBarStefano Facchini2012-10-171-8/+122
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=684288
* Revert "levelbar: start filling from the bottom"Cosimo Cecchi2012-09-191-10/+4
| | | | | | | This reverts commit 4b3ed75f7d14bc10a045aeb4a3873ff36eee966a. I didn't see https://bugzilla.gnome.org/show_bug.cgi?id=684288 - it makes more sense to properly fix this for the next cycle.
* levelbar: start filling from the bottomStefano Facchini2012-09-191-4/+10
| | | | | | As long as we don't have an API for explicitly inverting the bar, it makes more sense for the progress in vertical orientation to fill from the bottom.
* gtk/gtklevelbar.c: Fix build on non-C99 compilersChun-wei Fan2012-08-161-1/+3
| | | | | | | -Include fallback-c89.c for the usage of round(), where an implementation of round() is provided for compilers that don't have it -Use g_ascii_strtod() instead of strtof as strtof() may not be universally available.
* level-bar: introduce GtkLevelBarCosimo Cecchi2012-07-161-0/+1305
| | | | | | | Similar to CcStrengthBar from gnome-control-center, but more generic and with thorough CSS styling support. https://bugzilla.gnome.org/show_bug.cgi?id=677892
* Revert "level-bar: introduce GtkLevelBar"Matthias Clasen2012-07-111-1216/+0
| | | | | | This reverts commit 126a2308ca467744178d4be3309403f6899de987. Pushed by mistake.
* level-bar: introduce GtkLevelBarCosimo Cecchi2012-07-101-0/+1216
Similar to CcStrengthBar from gnome-control-center, but more generic and with thorough CSS styling support. https://bugzilla.gnome.org/show_bug.cgi?id=677892