本文整理汇总了Python中ubuntutweak.common.config.TweakSettings.get_window_size方法的典型用法代码示例。如果您正苦于以下问题:Python TweakSettings.get_window_size方法的具体用法?Python TweakSettings.get_window_size怎么用?Python TweakSettings.get_window_size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ubuntutweak.common.config.TweakSettings
的用法示例。
在下文中一共展示了TweakSettings.get_window_size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup_window_preference
# 需要导入模块: from ubuntutweak.common.config import TweakSettings [as 别名]
# 或者: from ubuntutweak.common.config.TweakSettings import get_window_size [as 别名]
def setup_window_preference(self):
table = self.worker.get_object('table1')
height, width = TweakSettings.get_window_size()
win_width = WidgetFactory.create('GconfSpinButton',
key = 'window_width',
min = 640, max = 1280, step = 1)
win_width.show()
win_width.connect('value-changed', self.on_value_changed)
table.attach(win_width, 1, 3, 0, 1)
win_height = WidgetFactory.create('GconfSpinButton',
key = 'window_height',
min = 480, max = 1280, step = 1)
win_height.show()
win_height.connect('value-changed', self.on_value_changed)
table.attach(win_height, 1, 3, 1, 2)
toolbar_size = WidgetFactory.create('GconfSpinButton',
key = 'toolbar_size',
min = 100, max = 500, step = 1)
toolbar_size.show()
toolbar_size.connect('value-changed', self.on_value_changed)
table.attach(toolbar_size, 1, 3, 2, 3)
示例2: get_gui_state
# 需要导入模块: from ubuntutweak.common.config import TweakSettings [as 别名]
# 或者: from ubuntutweak.common.config.TweakSettings import get_window_size [as 别名]
def get_gui_state(self):
self.set_default_size(*TweakSettings.get_window_size())
self.hpaned.set_position(TweakSettings.get_paned_size())