newt_syrup/configscreen.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
New commits:
commit e738761e8e01dd57863710a5aae43f0cc5e38c57
Author: Darryl L. Pierce <dpierce(a)redhat.com>
Date: Tue Aug 17 09:15:12 2010 -0400
More fixes to the fullscreen app support.
diff --git a/newt_syrup/configscreen.py b/newt_syrup/configscreen.py
index c6d0296..f57397e 100644
--- a/newt_syrup/configscreen.py
+++ b/newt_syrup/configscreen.py
@@ -138,18 +138,19 @@ class ConfigScreen:
leftmenu.setField(Label(indicator), 1, current_element)
current_element += 1
gridform.add(leftmenu, 1, 0,
- anchorTop = 1,
+ anchorTop = 1, anchorLeft = 1,
growx = 0)
current_element = 0
for element in elements:
# set the title of the page
- content.setField(element, 0, current_element)
+ content.setField(element, 0, current_element, anchorLeft = 1)
current_element += 1
(fullwidth, fullheight) = _snack.size()
if self.use_full_screen():
content.setField(Label(""), 0, current_element,
- padding = (fullwidth - 4, 0, 0, 0),
+ padding = ((fullwidth / 2) - 2, 0,
+ (fullwidth / 2) - 2, 0),
growx = 1)
current_element += 1
@@ -166,15 +167,14 @@ class ConfigScreen:
buttons.append(["Finish", FINISH_BUTTON, "F10"])
buttons.append(["Cancel", CANCEL_BUTTON, "ESC"])
buttonbar = ButtonBar(screen, buttons, compact = compact_buttons)
- content.setField(buttonbar, 0, current_element, growx = 0)
-
- # put a big piece at the top
- (width, height) = _snack.size()
+ content.setField(buttonbar, 0, current_element, anchorLeft = 1, growx = 0)
if self.use_full_screen():
gridform.add(Label(""), 0, 0,
- padding = (0, height - 4, 0, 0), growy = 1)
- gridform.add(Label(""), 3, 0, anchorTop = 1)
- gridform.add(content, 2, 0, anchorTop = 1)
+ padding = (0, (fullheight / 2) - 2,
+ 0, (fullheight / 2) - 2),
+ growy = 1)
+ gridform.add(Label(" "), 2, 0, anchorTop = 1)
+ gridform.add(content, 3, 0, anchorTop = 1)
current_element += 1
try:
# get the position for the main window