[Bugs] #610 NORM: Journal Palette does not manage too many characters for a title correctly

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Thu Apr 2 10:03:35 EDT 2009


#610: Journal Palette does not manage too many characters for a title correctly
-----------------------------------------------+----------------------------
    Reporter:  IwikiwI                         |          Owner:  tomeu      
        Type:  enhancement                     |         Status:  new        
    Priority:  Normal                          |      Milestone:  0.84       
   Component:  journal                         |        Version:  Unspecified
    Severity:  Blocker                         |     Resolution:             
    Keywords:  right click journal sugar-love  |   Distribution:  Fedora     
Status_field:  Assigned                        |  
-----------------------------------------------+----------------------------

Comment(by benzea):

 Hm, I am not sure if there is an ideal way to fix this ...

 I first thought that the best way is to limit the size of the palette in
 do_size_request. This is rather simple, but one runs into the issue, that
 the label requests a way too small area if ellipsizing is enabled. Wich
 means you the palettes are also too small.

 So how about:
  1. Limit the size to a certain maximum in do_size_request (make this
 value quite large, but eg. make sure that it is not larger than the
 screen). Keep in mind that a eg. a colorpicker palette may be quite large.
  2. Set max_width_chars to an insanely large value, and enable
 ellipsizing.

 The first point makes sure the palette does not get too large, the second
 one enforces the label to try to allocate as much space is as needed. (If
 you do not set max_width_chars, then it will only request enough space to
 show the '...'.)

 The corner case are still menu items with the names in them (eg. in the
 home view when starting the journal entry). Their size is also larger than
 the screen, but they may not have the hack (ie. point 2) in place. This
 means they will not be ellipsized, but instead the string is just
 truncated at some point.

-- 
Ticket URL: <http://dev.sugarlabs.org/ticket/610#comment:13>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list