Changeset 201:1999280506e6 for src/mlx/gui
- Timestamp:
- 05/28/12 04:44:39 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r191 r201 30 30 self.add(frame) 31 31 32 style = self.get_style() if pygobject else self.rc_get_style()33 34 32 self._vbox = gtk.VBox() 35 33 self._vbox.set_homogeneous(False) … … 37 35 38 36 eventBox = gtk.EventBox() 39 eventBox.modify_bg(0, style.bg[3])40 37 41 38 alignment = gtk.Alignment(xalign = 0.0, xscale = 0.0) 42 39 43 label = gtk.Label(title) 44 label.modify_fg(0, style.fg[3]) 45 label.modify_font(pango.FontDescription("bold 24")) 40 titleLabel = gtk.Label(title) 41 titleLabel.modify_font(pango.FontDescription("bold 24")) 46 42 alignment.set_padding(padding_top = 4, padding_bottom = 4, 47 43 padding_left = 6, padding_right = 0) 48 44 49 alignment.add( label)45 alignment.add(titleLabel) 50 46 eventBox.add(alignment) 51 47 52 48 self._vbox.pack_start(eventBox, False, False, 0) 49 50 self._titleEventBox = eventBox 51 self._titleLabel = titleLabel 53 52 54 53 mainBox = gtk.VBox() … … 141 140 clicked = clicked) 142 141 142 def setStyle(self): 143 """Set the styles of some of the items on the page.""" 144 style = self.get_style() if pygobject else self.rc_get_style() 145 146 self._titleEventBox.modify_bg(0, style.bg[3]) 147 self._titleLabel.modify_fg(0, style.fg[3]) 148 143 149 def initialize(self): 144 150 """Initialize the page. … … 2512 2518 self._finishPage = FinishPage(self) 2513 2519 self._pages.append(self._finishPage) 2514 2520 2515 2521 maxWidth = 0 2516 2522 maxHeight = 0 … … 2522 2528 maxWidth = max(maxWidth, width) 2523 2529 maxHeight = max(maxHeight, height) 2530 page.setStyle() 2524 2531 maxWidth += 16 2525 2532 maxHeight += 32
Note:
See TracChangeset
for help on using the changeset viewer.