Ticket #4107: 0001-Do-not-use-set_size_request-to-avoid-screen-overflow.patch

File 0001-Do-not-use-set_size_request-to-avoid-screen-overflow.patch, 1.8 KB (added by humitos, 11 years ago)

Patch for 'origin/Gtk3' branch

  • wordsactivity.py

    From a57ccb55eb60b0c246640bc6a1adffd9099e0010 Mon Sep 17 00:00:00 2001
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Tue, 6 Nov 2012 17:34:28 +0000
    Subject: [PATCH Words] Do not use 'set_size_request' to avoid screen overflow
     SL #4107
    
    Properly use of 'set_border_width' to keep the border just on the
    Gtk.Entry's and remove 'set_border_width' from the Gtk.VBox and added
    it to the Gtk.Table that contains the Gtk.Entry's.
    
    Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
    ---
     wordsactivity.py | 7 ++-----
     1 file changed, 2 insertions(+), 5 deletions(-)
    
    diff --git a/wordsactivity.py b/wordsactivity.py
    index f23480e..da77d6d 100644
    a b class WordsActivity(activity.Activity): 
    6161
    6262        # Main layout | disposicion general
    6363        hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, homogeneous=True, spacing=8)
    64         vbox =  Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=20)
    65         vbox.set_border_width(20)
     64        vbox =  Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
    6665
    6766        toolbar_box = ToolbarBox()
    6867        activity_button = ActivityButton(self)
    class WordsActivity(activity.Activity): 
    105104        transbox.resize(2, 3)
    106105        transbox.set_row_spacings(8)
    107106        transbox.set_col_spacings(12)
     107        transbox.set_border_width(20)
    108108
    109109        # Labels | Etiquetas
    110110        label1 = Gtk.Label(label=_("Word") + ':')
    class WordsActivity(activity.Activity): 
    156156        self.lang2combo.connect("changed", self.lang2combo_cb)
    157157        self.lang2combo.set_active(4)
    158158       
    159         self.lang1combo.set_size_request(600, 50)
    160         self.lang2combo.set_size_request(600, 50)
    161 
    162159        # The "lang1" treeview box
    163160        self.lang1model = Gtk.ListStore(str)
    164161        lang1view = Gtk.TreeView(self.lang1model)