summaryrefslogtreecommitdiff
path: root/gtk
Commit message (Collapse)AuthorAgeFilesLines
* docs: Update examples of matching key bindingsEmmanuele Bassi2016-05-091-6/+9
| | | | | | The selector for matching GtkEntry has changed to `entry` after 3.20. https://bugzilla.gnome.org/show_bug.cgi?id=766166
* Adwaita: relocate a selectorLapo Calamandrei2016-05-063-10/+6
| | | | | relocate treview acceleditor > label in the treeview section and add a comment for a testcase.
* Adwaita: tidy treeview style properties...Lapo Calamandrei2016-05-063-23/+23
| | | | ...removing a double definition in the process.
* scale: Fix mark positioning at the left/top edgeMatthias Clasen2016-05-051-1/+5
| | | | | | | We were failing to take the widget allocation.x/y into account when deciding whether we need to push in the mark. https://bugzilla.gnome.org/show_bug.cgi?id=765922
* searchenginetracker: Quote fts match so it's seen as a single phraseCarlos Garnacho2016-05-051-5/+10
| | | | | | | FTS5 has a complex enough syntax that it makes not much sense to wrap in simple search boxes. https://bugzilla.gnome.org/show_bug.cgi?id=765981
* css names are always setMatthias Clasen2016-05-051-2/+1
| | | | | No need to check for it, we set the css name on GtkWidgetClass ourselves.
* switch: Remove .slider from slider gadgetTimm Bäder2016-05-051-1/+0
| | | | | As the documentation states, neither the switch nor the slider gadget should be using any style classes.
* switch: Create less pango layoutsTimm Bäder2016-05-051-35/+60
| | | | | | Instead of creating 2 pango layouts in every draw() and on in _get_content_size (and calling into gettext twice in both cases), just keep the layouts around and create them in only one place.
* label: Also initialize textTimm Bäder2016-05-051-1/+1
| | | | | So gtk_label_get_text returns the default value of "". Broke the GtkModelButton default value test.
* label: don't use set_text in gtk_label_newTimm Bäder2016-05-051-3/+1
| | | | | It would just set up lots of things with the default values, but a common case is that a few gtk_label_set_* calls follow.
* label: minimum/natural size parameters are not nullableTimm Bäder2016-05-051-5/+2
| | | | Stop comparing them to NULL.
* label: Don't set out parameters twiceTimm Bäder2016-05-051-6/+6
| | | | | We set them later again when we calculate the vertical size, so just move the general assignment to -1 into the horizontal branch.
* widget: Remove useless NULL checkTimm Bäder2016-05-051-3/+3
| | | | | We are checking for allocation != NULL at the beginning of the function already. This also means that the allocation parameter is not nullable.
* cssimagebuiltin: Remove icons that don't draw anything anymoreBenjamin Otte2016-05-055-16/+10
|
* cssimagebuiltin: Remove unused variablesBenjamin Otte2016-05-052-21/+1
|
* css: Stop drawing double borders for builtinsMatthias Clasen2016-05-051-34/+1
| | | | | | | The fallback code for rendering builtin checks, radios and expanders was using border parameters. With the generic gadget borders using the same parameters, this was giving double borders.
* shadowsvalue: Don't draw invisible box shadowsTimm Bäder2016-05-051-0/+12
|
* Fix gtk_paned_set_position to set position_set consistentlyMatthias Clasen2016-05-051-11/+14
| | | | | As pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=765676, we were failing to set position_set if the position did not change.
* GtkPlacesView: check for network:// URI support before using itРуслан Ижбулатов2016-05-051-0/+12
| | | | | | | | Specifically, this URI is not supported on Windows, but GFile will do its "best" and turn it into GLocalFile("$pwd/network"), with spectacularly bad results. https://bugzilla.gnome.org/show_bug.cgi?id=765858
* dnd: Make sure to free a stashed eventMatthias Clasen2016-05-051-0/+3
| | | | I am not sure if this happens in practice, but better to be safe.
* gesture: Don't leak stashed eventsMatthias Clasen2016-05-051-1/+12
| | | | These events were never freed.
* Use a better hash for arcsMatthias Clasen2016-05-051-1/+17
|
* box gadget: Redo expand flag handlingMatthias Clasen2016-05-057-101/+67
| | | | | | | | | | | | | | | | | We only keep one align flag per child, so it seems odd to keep separate h/v expand flags. Just keep one expand flag and interpret it according to orientation. Allow setting the expand flag for child widgets too, though, so we can make widget expand without interfering with the recursive widget expand flag. Update all callers. Use the new possibility of expanding child widgets to make the label of check and radio buttons expand. This fixes unexpected behavior of these widgets in RTL in some places. https://bugzilla.gnome.org/show_bug.cgi?id=765742
* expander: Reverse alignments in RTLMatthias Clasen2016-05-051-0/+2
| | | | Flip alignments of the title gadget children.
* check button: Reverse alignments in RTLMatthias Clasen2016-05-051-0/+2
| | | | Flip alignments for the box gadget children.
* box gadget: allow reversing alignmentsMatthias Clasen2016-05-052-4/+32
| | | | | | | In RTL, we want to interpret GTK_ALIGN_START and _END in the opposite way. Since we don't give gadgets a text direction, just allow setting an align_reverse flag to the box gadget.
* GtkTreeView: change child repositioning to preserve localityРуслан Ижбулатов2016-05-051-4/+32
| | | | | | | | | | | | | | | | | If there was a piece of text in the cell, then when the edit entry is shown for that cell, it should have a piece of text in it roughly at the same location. Therefore, when child widget is enlarged (child preferred size exceeds cell size), extra width should be added by extending either left or right edge depending on text direction. If after that the child sticks outside of the treeivew visible region, try to push it back inside (breaking its alignment with the cell), again, giving preference (i.e. adjusting it last) to either left or right edge depending on text direction. https://bugzilla.gnome.org/show_bug.cgi?id=765471
* Adwaita: add a background to cellrendertextLapo Calamandrei2016-05-053-0/+13
|
* pixelcache: reuse existing timeout source when possibleChristian Hergert2016-05-051-31/+24
| | | | | | | | | | | | This avoids the g_source_remove(), g_source_destroy(), g_timer_source_new(), and g_source_set_name_by_id() in the common case. Instead, we reuse our previous source and update the ready time to our new deadline. We lose the coalescing with g_timeout_add_seconds(), but that is not going to help in the common case anyway (unless you have three hands and can scroll multiple pixelcached backed widgets at once). https://bugzilla.gnome.org/show_bug.cgi?id=765640
* dnd: Fix some issues with drag iconsMatthias Clasen2016-05-051-50/+34
| | | | | | | | In non-composited environments, we were ending up with all-black drag icons, because nothing was drawing the background of our new toplevel. Fix this by drawing background when we are not composited. We don't do this when composited, since we want to allow transparent icons.
* dnd: Set attributes from all widgets for text drag iconsMatthias Clasen2016-05-051-6/+4
| | | | There is nothing textview-specific here.
* progressbar: Enforce invariantsMatthias Clasen2016-05-051-1/+1
| | | | | | | When measuring gadgets, minimum must come out <= natural. Make sure we don't fail this when measuring progressbar text. https://bugzilla.gnome.org/show_bug.cgi?id=765644
* dnd: Fix lifecycle issues with widgets as drag iconsMatthias Clasen2016-05-051-0/+13
| | | | | | | | | The documentation clearly says that the widget is not destroyed, but we were in fact failing to keep it alive, since it was still a child or the icon_window when we destroy that. Fix this by reparenting the icon_widget out before. Also, deal with the possibility that the application might destroy the widget halfway through, for whatever reason.
* font button: Fix translation of font-name defaultMatthias Clasen2016-05-051-1/+1
| | | | | The default value should come out of regular translations, not property translations.
* GtkLabel: Use g_clear_objectTimm Bäder2016-05-051-15/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=765496
* GtkLabel: Don't manually iterate over link listTimm Bäder2016-05-051-35/+16
| | | | | | | | There are various functions to access links based on their index for a11y. We can spare quite a few lines of code by just using g_list_nth_data instead of iterating over the list ourselves. https://bugzilla.gnome.org/show_bug.cgi?id=765496
* builtinicon: avoid calculating font-metrics in vast majority of casesChristian Hergert2016-05-051-16/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We perform lots of gadget allocations that require allocating a GtkBuiltinIcon. One notable example is the scrollbar for a scrolled window. In the process of doing this, we often calculate baseline information that isn't necessary. With how much this code path gets exercised, its worth catching the result for the common case, which is that the font-description has not changed and we are using the default language the application was started with. This simply caches the previous result and verifies that we can reuse it with pango_font_description_hash() and a simple language check. Numbers below are scrolling through a textview with GDK_KEY_Down. Before: SELF CUMULATIVE FUNCTION [ 0.08%] [ 9.26%] gtk_builtin_icon_get_preferred_size [ 0.01%] [ 8.82%] pango_context_get_metrics [ 0.02%] [ 0.16%] gtk_widget_get_pango_context [ 0.06%] [ 0.06%] pango_context_get_language [ 0.01%] [ 0.02%] g_type_check_instance_cast [ 0.02%] [ 0.02%] strlen [ 0.02%] [ 0.02%] pango_context_get_font_description [ 0.02%] [ 0.02%] g_list_foreach [ 0.01%] [ 0.01%] gtk_css_style_get_value [ 0.01%] [ 0.01%] itemize_with_font [ 0.01%] [ 0.01%] pango_context_get_type [ 0.01%] [ 0.01%] get_base_metrics [ 0.00%] [ 0.01%] pango_font_metrics_unref [ 0.01%] [ 0.01%] g_list_free [ 0.01%] [ 0.01%] gtk_builtin_icon_get_type After: SELF CUMULATIVE FUNCTION [ 0.08%] [ 0.18%] gtk_builtin_icon_get_preferred_size [ 0.02%] [ 0.02%] pango_font_description_hash [ 0.00%] [ 0.02%] gtk_widget_get_pango_context [ 0.00%] [ 0.02%] g_object_get_qdata [ 0.00%] [ 0.02%] g_datalist_id_get_data [ 0.02%] [ 0.02%] gtk_builtin_icon_get_type [ 0.01%] [ 0.01%] pango_context_get_font_description [ 0.00%] [ 0.01%] - - kernel - - [ 0.01%] [ 0.01%] pango_context_get_language [ 0.00%] [ 0.01%] gtk_css_style_get_value [ 0.00%] [ 0.01%] gtk_css_gadget_get_style https://bugzilla.gnome.org/show_bug.cgi?id=765486
* inspector: do not leak seat capabilities descriprionPaolo Borelli2016-05-051-18/+27
| | | | | Factor out an utility function for readability and free the string with the list of capabilities
* kineticscrolling: avoid stutter at tail of kinetic decelerationChristian Hergert2016-05-051-1/+4
| | | | | | | | | | | | When decelerating the kinetic scroll, we can get into a position where it looks like we are stuttering. This happens because the amount we move is so little that it takes multiple frames to make forward progress by one pixel. This prevents that by detecting when we have reached the slow stutter of the deceleration and simply stops the deceleration phase immediately. https://bugzilla.gnome.org/show_bug.cgi?id=765493
* Fix formattingMatthias Clasen2016-05-051-7/+7
| | | | The previous change was not quite using the right coding style.
* listbox: Make sure page down/up move at least one rowTimm Bäder2016-05-051-36/+17
| | | | | | | | | When the current cursor_row is taller than the page_size we get from the GtkAdjustment, the previous code would not actually cause any scrolling, so make sure we just take the row after or before the cursor_row in that case. https://bugzilla.gnome.org/show_bug.cgi?id=765261
* cssshadowsvalue: Avoid allocating new value if not neededBenjamin Otte2016-05-052-5/+41
|
* cssbordervalue: Avoid allocating new value if not neededBenjamin Otte2016-05-051-6/+11
|
* cssbgsizevalue: Avoid allocating new value if not neededBenjamin Otte2016-05-051-0/+10
|
* gtkmenusectionbox: remove submenus when the parent item is removedJonathan Matthew2016-05-051-0/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=749405
* widget: Don't show widget resizes in the inspectorMatthias Clasen2016-05-051-1/+1
| | | | | Avoiding this sort of visual debugging in the inspector is the main reason we have per-display debug flags now.
* css gadget: Fix baseline debugMatthias Clasen2016-05-051-1/+1
| | | | We were not using the baseline that we're computing.
* Use qdata for debug flagsMatthias Clasen2016-05-051-2/+5
| | | | This avoids some overhead.
* css gadget: Don't get display flags twiceMatthias Clasen2016-05-051-2/+3
| | | | | This got more expensive now that we store them per-display, so don't get them twice in the same function.
* debug: remove open-coded debug checks in gtktextsegmentChristian Hergert2016-05-051-7/+7
| | | | | | | | | | | | These runtime checks were being performed whether or not we were in a debug build. Using GTK_DEBUG_CHECK() will compile out of production builds, as it will result in something like: if (G_UNLIKELY(0)) which the optimizer can prune. https://bugzilla.gnome.org/show_bug.cgi?id=765284