1. 09 Jun, 2014 1 commit
  2. 19 Feb, 2014 1 commit
  3. 09 Feb, 2014 1 commit
  4. 07 Feb, 2014 1 commit
  5. 05 Feb, 2014 1 commit
  6. 04 Feb, 2014 1 commit
  7. 02 Feb, 2014 1 commit
  8. 29 Jan, 2014 1 commit
  9. 09 Jul, 2013 1 commit
  10. 07 May, 2013 1 commit
  11. 25 Nov, 2012 2 commits
  12. 14 Nov, 2012 4 commits
  13. 04 Nov, 2012 11 commits
    • Benjamin Otte's avatar
    • Benjamin Otte's avatar
      sizegroup: Construct the set of sizegroup peers as a hash table · 8bdff7a5
      Benjamin Otte authored
      This way we don't need a marker on GtkWidgetParivate that needs to be
      unset later, so we have all our data in the same place and can avoid
      problems with reentrancy and shenanigans like that.
      But the main reason I wrote that is cleaner code.
    • Benjamin Otte's avatar
      sizegroup: Use _gtk_widget_compute_size_for_orientation() · dd6931d1
      Benjamin Otte authored
      With this function now available, we can do size computation in 2
      (1) Compute size with size groups
      (2) Compute size without size groups
      And have (1) use (2) instead of setting flags on widgets. This patch
      does exactly that.
    • Benjamin Otte's avatar
      sizegroups: Use is_visible() instead of get_mapped() for visibility · be1bde91
      Benjamin Otte authored
      The current approach of using gtk_widget_get_mapped() is broken:
      The usual steps taken when showing a window are:
      (1) request the sizes
      (2) allocate the sizes
      (3) show the window in the allocated size
      Showing the window with a random size between steps (1) and (2) would of
      result in extra work and potential flickering when the widgets get
      resized to
      their proper sizes.
      However, as GtkSizeGroup::ignore-hidden uses gtk_widget_get_mapped() to
      determine visibility for a widget, the following will happen:
      (1) the widget will request a 0 size
      (2) the widget will be allocated a 0 size
      (3) the widget will be too small when it is shown
      gtk_widget_get_visible() however is set in advance. Note that toggling
      visibility also causes a gtk-widget_queue_resize() call already so we
      take care of changes in here automatically.
    • Benjamin Otte's avatar
      sizegroup: Handle hfw in size groups · 9f6067a8
      Benjamin Otte authored
    • Benjamin Otte's avatar
      sizegroup: Add a function for clarity · c8f23283
      Benjamin Otte authored
      ... and restructure code to accomodate that function.
    • Benjamin Otte's avatar
      sizegroup: Don't keep groups around everywhere · dbbdefe4
      Benjamin Otte authored
      The code is only interested in the actual widgets that belong together,
      not in the groups. So just don't return the groups.
    • Benjamin Otte's avatar
      sizegroup: Check ignore_hidden flag when adding groups · dfea266e
      Benjamin Otte authored
      Instead of only checking the ignore_hidden flag when getting the
      preferred sizes, respect it already when constructing the list of
      widgets. This way, widgets don't queue resizes for groups they're
      ignored in anyway.
    • Benjamin Otte's avatar
      sizegroup: Use for loops · a1f6887f
      Benjamin Otte authored
      For loops to loop over lists look nicer and actually do the right thing
      with "break" and "continue" statements. So they are vastly preferred to
      while loops.
    • Benjamin Otte's avatar
      sizegroups: Restructure code · 8796fe6d
      Benjamin Otte authored
      This way, we do the checks at the start of the effected function, not
      before calling it.
    • Benjamin Otte's avatar
      sizegroup: Don't cache the sizes anymore · 8710d979
      Benjamin Otte authored
      This simplifies code and because sizes are cached by the widgets
      themselves, it's not a large performance problem (unless people use huge
      amounts of widgets in a single size group, but who does that?
  14. 01 Nov, 2012 1 commit
  15. 27 Feb, 2012 1 commit
  16. 29 Sep, 2011 1 commit
  17. 06 Jun, 2011 1 commit
  18. 18 Apr, 2011 1 commit
  19. 07 Feb, 2011 1 commit
    • Tristan Van Berkom's avatar
      Optimize queue_resize_on_widget() · 1c20c934
      Tristan Van Berkom authored
      Optimized GtkSizeGroup code that is invoked for every queued resize
      and every request that is not previously cached by trading qdata on
      widgets for 3 extra bitfields on the GtkWidgetPrivate structure.
  20. 06 Jan, 2011 1 commit
  21. 04 Jan, 2011 1 commit
  22. 20 Oct, 2010 1 commit
  23. 11 Oct, 2010 1 commit
    • Owen W. Taylor's avatar
      Fix handling of the geometry widget · 88cf5470
      Owen W. Taylor authored
      The geometry widget feature of gtk_window_set_geometry_hints() has
      never really worked right because the calculation that GTK+ did to
      compute the base size of the window only worked when the geometry
      widget had a larger minimum size than anything else in the window.
      * Move the GtkSizeGroup private functions to a new private header
      * Add the possibilty to pass flags to _gtk_size_group_queue_resize(),
        with the flag GTK_QUEUE_RESIZE_INVALIDATE_ONLY to suppress adding
        the widget's toplevel to the resize queue.
      * _gtk_container_resize_invalidate() is added to implement that feature
      * _gtk_widget_override_size_request()/_gtk_widget_restore_size_request()
        allow temporarily forcing a large minimum size on the geometry
        widget without creating resize loops.
      * Compute the extra width/height around the geometry widget
        correctly; print a warning if the computation fails.
      * Always make the minimum size at least the natural minimum
        size of the toplevel; GTK+ now fails badly with underallocation.
      * Always set the base size hint; we were failing to set it
        properly when the specified minimum size was overriden, but
        it's harmless to always set it.
      * New test 'testgeometry' that replaces the 'gridded geometry' test
        from testgtk. The new test is roughly similar but creates a bunch
        of windows showing different possibilities.
      * The testgtk test is removed. No need to have both.
  24. 27 Sep, 2010 1 commit
  25. 26 Sep, 2010 1 commit
    • Benjamin Otte's avatar
      Move GtkSizeRequest into GtkWidget · d9c92598
      Benjamin Otte authored
      It doesn't make sense to keep them separate as GtkSizeRequest requires a
      GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
      one without the other.
      It also makes the code a lot easier because no casts are required when
      calling functions.
      Also, the names would translate to gtk_widget_get_width() and people
      agreed that this would be a too generic name, so a "preferred" was added
      to the names.
      So this patch moves the functions:
      gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
      gtk_size_request_get_width() => gtk_widget_get_preferred_width()
      gtk_size_request_get_height() => gtk_widget_get_preferred_height()
      gtk_size_request_get_size() => gtk_widget_get_preferred_size()
      gtk_size_request_get_width_for_height() =>
      gtk_size_request_get_height_for_width() =>
      ... and moves the corresponding vfuncs to the GtkWidgetClass.
      The patch also renames the implementations of the vfuncs in widgets to
      include the word "preferrred".
  26. 14 Sep, 2010 1 commit