1. 11 May, 2012 4 commits
  2. 10 May, 2012 2 commits
  3. 09 May, 2012 2 commits
  4. 08 May, 2012 6 commits
  5. 07 May, 2012 9 commits
  6. 06 May, 2012 11 commits
    • Benjamin Otte's avatar
      iconview: Don't expand items to more than natural size · e133c6cb
      Benjamin Otte authored
      This ensures that items stay left-aligned instead of slowly expanding into
      empty space when widening the iconview. It's also what the iconview did
      pre-refactoring.
      
      Note that for cases where natural width != minimum width, the cells
      might still expand and shrink back.
      e133c6cb
    • Benjamin Otte's avatar
      tests: Remove unused include · e187cda5
      Benjamin Otte authored
      Fixes build
      e187cda5
    • Benjamin Otte's avatar
      iconview: Redo layouting · d20d7c54
      Benjamin Otte authored
      d20d7c54
    • Benjamin Otte's avatar
      b7385ffc
    • Benjamin Otte's avatar
      iconview: Reduce complexity of sizing code · d406bf96
      Benjamin Otte authored
      Always assume max-columns and min-rows. The old approach was kinda
      insane.
      
      As an example, try to write an algorithm that optimizes the minimum size
      for infinite (take a reasonably large number like 2520) word-wrapped
      Monospace text cells containing the text "XXXXX XXX XXX XXXXX" (keep in
      mind that this is the easy problem, because it's assuming equal cell
      renderers). There's 4 ways to reasonably lay out this text:
      19 glyphs (19x1):
        XXXXX XXX XXX XXXXX
      18 glyphs (9x2):
        XXXXX XXX
        XXX XXXXX
      21 glyphs (7x3):
        XXXXX
        XXX XXX
        XXXXX
      20 glyphs (5x4):
        XXXXX
        XXX
        XXX
        XXXXX
      The best thing to do usually is using the 9x2 approach, but that's
      neither the one using the natural nor the one using the minimum size.
      
      As a side note, this does not include spacing and padding, which might
      also influence the decision. Nor does it include height-for-width
      considerations. Look at this table (numbers given in glyphs, not pixels,
      as for pixel-sizes it gets even more interesting):
        given  best solution
        width  columns  sizing  glyphs per cell
         6      1       6x4           20
         7      1       7x3           21
         8      1       7x3           24
         9      1       9x2           18
        10      1/2     9x2/5x4       20
        11      1/2     9x2/5x4       22
        12      1/2     9x2/5x4       24
        13      1/2     9x2/5x4       26
        14      2       7x3           21
        15      3       5x4           20
        16      3       5x4           21.3
        17      3       5x4           22.7
        18      2       9x2           18
        19      1/2    19x1/8x2       19
        20      1/2/4  19x1/8x2/5x4   20
        21      1-4     any           21
        22      1-4     any           22
        23      1-4     any           23
        24      1-4     any           24
        25      5       5x4           20
        26      5       5x4           20.8
        27      3       9x2           18
        28      3       9x2           18.7
        29      3       9x2           19.3
        30      3/6     9x2/5x4       20
      
      Now of course, nobody wants the number of columns to randomly change in
      inexplicable ways while they enlarge or shrink an iconview, so we not
      only have to optimize for smallest or other size measurements, but we
      also have to optimize for "most pleasing to the eye".
      
      And last but not least, I'd like to once again remind you - if you kept
      up until now - that this discussion was for identically-sized cells
      only.
      d406bf96
    • Benjamin Otte's avatar
      tests: Make testcellarea use an iconview · 2da7a6d8
      Benjamin Otte authored
      2da7a6d8
    • Benjamin Otte's avatar
      iconview: Redo size requests · 65ad492c
      Benjamin Otte authored
      Instead of just returning the last allocated numbers, we now compute the
      proper sizes from scratch. This is a bit less trivial, but it results in
      proper height-for-width handling.
      65ad492c
    • Benjamin Otte's avatar
      iconview: Don't cache iters · 63ddb3f2
      Benjamin Otte authored
      This is a huge quest to remove all caching from GtkIconview to simplify
      the code. As it turns out, iconview performance is a joke, so the caches
      are kinda unnecessary.
      
      If we need caching, we can add it in a useful way later.
      63ddb3f2
    • Benjamin Otte's avatar
      iconview: Remove needless requirement · ee91e272
      Benjamin Otte authored
      If we use
        &item->cell_area
      instead of
        (GdkRectangle *) item
      there is no need anymore to keep the cell_area as the first member of
      the the item. And we cget compile-time checks for changes to the item
      struct.
      ee91e272
    • José Alburquerque's avatar
    • Paolo Borelli's avatar
      [socket]: fix gtk-doc warnings. · 3b0cd0eb
      Paolo Borelli authored
      3b0cd0eb
  7. 05 May, 2012 3 commits
  8. 04 May, 2012 3 commits