mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
Hob(crumbs/builder.py): adjust the main window's position and ignore the case lower than 1024x768.
* don't set the position of the main window to the center always * don't show the message to users if their screen dimensions are lower than 1024x768 (Bitbake rev: 1afa500cb1cb5c10fc0a3ea0f65c7ecc8887efa8) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d76e62fdd8
commit
7ee14c1994
@@ -223,20 +223,12 @@ class Builder(gtk.Window):
|
|||||||
def create_visual_elements(self):
|
def create_visual_elements(self):
|
||||||
self.set_title("Hob - Image Creator")
|
self.set_title("Hob - Image Creator")
|
||||||
self.set_icon_name("applications-development")
|
self.set_icon_name("applications-development")
|
||||||
self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
|
|
||||||
self.set_resizable(True)
|
self.set_resizable(True)
|
||||||
window_width = self.get_screen().get_width()
|
window_width = self.get_screen().get_width()
|
||||||
window_height = self.get_screen().get_height()
|
window_height = self.get_screen().get_height()
|
||||||
if window_width >= hwc.MAIN_WIN_WIDTH:
|
if window_width >= hwc.MAIN_WIN_WIDTH:
|
||||||
window_width = hwc.MAIN_WIN_WIDTH
|
window_width = hwc.MAIN_WIN_WIDTH
|
||||||
window_height = hwc.MAIN_WIN_HEIGHT
|
window_height = hwc.MAIN_WIN_HEIGHT
|
||||||
else:
|
|
||||||
lbl = "<b>Screen dimension mismatched</b>\nfor better usability and visual effects,"
|
|
||||||
lbl = lbl + " the screen dimension should be 1024x768 or above."
|
|
||||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
|
|
||||||
dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
|
|
||||||
dialog.run()
|
|
||||||
dialog.destroy()
|
|
||||||
self.set_size_request(window_width, window_height)
|
self.set_size_request(window_width, window_height)
|
||||||
|
|
||||||
self.vbox = gtk.VBox(False, 0)
|
self.vbox = gtk.VBox(False, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user