summaryrefslogtreecommitdiff
path: root/gtk/gtklevelbar.c
Commit message (Collapse)AuthorAgeFilesLines
* levelbar: Use a bin layoutTimm Bäder2019-09-251-35/+2
|
* Use the new GtkBuildableParser type in GtkBuildable interfacesAlexander Larsson2019-09-101-13/+13
|
* Remove gtk_widget_get/set_has_surfaceMatthias Clasen2019-05-281-2/+0
| | | | | These serve no purpose anymore - widgets don't have surfaces, unless they're a GtkNative.
* level bar: Make finalMatthias Clasen2019-05-261-0/+12
|
* gizmo: Add a contains_funcMatthias Clasen2019-04-071-2/+3
| | | | | Let GtkGizmo override the contains() implementation. Update all callers to pass NULL for the contains_func.
* gizmo: return void from snapshot funcTimm Bäder2019-01-181-3/+1
| | | | | This boolean return was from the old gadget code and we weren't using it in the new gizmo code.
* widget: Don't pass a position to ->size_allocateTimm Bäder2018-11-131-24/+32
| | | | | The values have been 0/0 for a long time now, so just drop the GtkAllocation argument and replace it with width and height.
* levelbar: Don't return a double value from a gboolean functionTimm Bäder2018-08-051-1/+1
|
* Remove some unnecessary snapshot implementationsTimm Bäder2018-06-201-11/+0
|
* widget: Remove clip from size-allocate vfuncBenjamin Otte2018-04-051-21/+12
| | | | As the clip is no longer needed, get rid of it.
* Merge branch 'rename-window-to-surface' into 'master'Alexander Larsson2018-03-201-1/+1
|\ | | | | | | | | Rename window to surface See merge request GNOME/gtk!72
| * GtkWidget: Start renaming widget->windowAlexander Larsson2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an automated change doing these command: git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface git sed -f g gtk_widget_set_window gtk_widget_set_surface git sed -f g gtk_widget_get_window gtk_widget_get_surface git sed -f g gtk_widget_register_window gtk_widget_register_surface git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface git checkout NEWS*
* | levelbar: Remove priv pointerTimm Bäder2018-03-201-67/+100
|/
* The big versioning cleanupMatthias Clasen2018-02-061-42/+0
| | | | | | | Remove all the old 2.x and 3.x version annotations. GTK+ 4 is a new start, and from the perspective of a GTK+ 4 developer all these APIs have been around since the beginning.
* gtk: Intern css namesMatthias Clasen2017-11-171-1/+1
| | | | This avoids a bunch of strdups at startup.
* LevelBar: Really fix underallocation of blocksDaniel Boles2017-08-291-1/+13
| | | | | | | | | | | | | | | | | | | Themes should not enforce min sizes on blocks in continuous mode; in this case, the filled block should be as large as it needs to be to reflect the current value, and no larger or smaller than that. So, the fact that the minimal size was selected on just levelbar block is wrong: we should also require the levelbar.discrete class to apply min sizes. The widget should enforce whatever correct minimum size results from the above fix, by reapplying commit 78b4885fe8850e132d8bb06df8ab90ac6c2033e0 Except: we should not allocate/draw the filled block if the value is 0, as in this case, the LevelBar should be empty, not have a min-size fill. This partially reverts commit 96062ffeae5245fa165a96a2af86d5645f5e8569, as it makes sense to set min sizes for discrete blocks, so keep that in. https://bugzilla.gnome.org/show_bug.cgi?id=783649
* LevelBar: Don’t pointlessly copy an allocationDaniel Boles2017-08-121-2/+1
| | | | now featuring the required comma :/
* Revert "LevelBar: Avoid unnecessarily copying allocation"Matthias Clasen2017-08-121-1/+2
| | | | | | This reverts commit d5e25be9bcd6c1a9db74ee749fa8808ba55a5ca5. It doesn't build.
* LevelBar: Avoid unnecessarily copying allocationDaniel Boles2017-08-121-2/+1
| | | | Just use the original allocation, instead of copying it and passing that
* Revert "levelbar: Don't underallocate block widgets"Daniel Boles2017-08-081-6/+0
| | | | | | | | | This reverts commit e25e1c54a44264de628fb3919fb47afd44e21ba5. That commit causes a block always to be shown at the min side, even when the value is 0, in which case, no fill should be shown. https://bugzilla.gnome.org/show_bug.cgi?id=783649
* widget: Add baseline and out_clip parameters to size-allocateTimm Bäder2017-07-191-19/+17
| | | | | | | | | | | Since setting a clip is mandatory for almost all widgets, we can as well change the size-allocate signature to include a out_clip parameter, just like GtkCssGadget did. And since we now always propagate baselines, we might as well pass that one on to size-allocate. This way we can also make sure to transform the clip returned from size-allocate to parent-coordinates, i.e. the same coordinate space priv->allocation is in.
* levelbar: Don't underallocate block widgetsTimm Bäder2017-07-191-0/+6
|
* Slightly rework clip handlingTimm Bäder2017-07-191-3/+1
| | | | | | | | | | | always initialize clips to the (content) allocation, don't walk up the widget hierarchy in gtk_widget_set_clip, implement gtk_widget_size_allocate in GtkSeparator. This way we don't end up using uninitialized clip values. The entire clip handling is up for major rework since we can't and don't want to force every single widget to call _set_clip in size-allocate implementations.
* levelbar: Don't allocate 0 blocksTimm Bäder2017-04-301-0/+3
| | | | | Could result in a division by zero later on and doesn't make a lot of sense anyway.
* levelbar: Use widgets for all blocksTimm Bäder2017-04-251-136/+103
| | | | | | | | This replaces all internal gadgets with widgets. Remaining problem: "block" nodes have a min-width of 32px in Adwaita, but when allocated in continuous mode, the levelbar doesn't care and underallocates them.
* levelbar: Remove unused defineTimm Bäder2017-04-241-2/+0
|
* gadget: Remove gtk_css_gadget_draw()Benjamin Otte2016-12-201-2/+0
| | | | | | | And with it, remove the draw func from custom gadgets, that has been NULL everywhere. All gadgets are snapshot now.
* levelbar: Implement snapshot()Benjamin Otte2016-12-191-18/+16
|
* snapshot: Add a snapshot function to GtkCssCustomGadgetBenjamin Otte2016-11-151-0/+2
|
* levelbar: update css nodes even when no offset value is foundGeorges Basile Stavracas Neto2016-11-041-21/+17
| | | | | | | | | | | | GtkLevelBar supports adding custom offsets as style classes, and they are applied whenever the :value property matches. The current code, however, only updates any CSS nodes when an offset is found, causing it to not update when a discrete value changes but no custom offset is added. Fix that by always updating the CSS nodes. https://bugzilla.gnome.org/show_bug.cgi?id=773799
* widget: Use ::measure vfunc to measure sizeTimm Bäder2016-10-221-20/+11
| | | | | | | | Add a new ::measure vfunc similar to GtkCssGadget's that widget implementations have to override instead of the old get_preferred_width, get_preferred_height, get_preferred_width_for_height, get_preferred_height_for_width and get_preferred_height_and_baseline_for_width.
* Remove various sizing related style propertiesTimm Bäder2016-10-161-35/+0
|
* Use NULL for generic marshallers in g_signal_new()Benjamin Otte2016-08-291-1/+1
| | | | | glib will use the correct marshaller automatically. And as a side effect, we also get all glib optimizations, like a va marshaller.
* 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.