diff options
author | Walter Bender <walter.bender@gmail.com> | 2012-10-21 19:01:37 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2012-10-21 19:01:37 (GMT) |
commit | 2e555d841d504aea409a9e78125e25599c1da59b (patch) | |
tree | 7c3bd9719dadee0d79bc8f184c5695ef45c57dd6 | |
parent | 9548d69f99ddafe601e2ee401f492abaf65c0a4c (diff) |
add stub for testing for tablet mode
-rw-r--r-- | PortfolioActivity.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/PortfolioActivity.py b/PortfolioActivity.py index 4a9274d..c8b5777 100644 --- a/PortfolioActivity.py +++ b/PortfolioActivity.py @@ -198,6 +198,9 @@ class PortfolioActivity(activity.Activity): self._setup_presence_service() + def _tablet_mode(self): + return True + def _fixed_resize_cb(self, widget=None, rect=None): ''' If a toolbar opens or closes, we need to resize the vbox holding out scrolling window. ''' @@ -944,7 +947,10 @@ class PortfolioActivity(activity.Activity): self.text_entry.set_size_request(w, h) bx, by = spr.get_xy() mx, my = spr.label_left_top() - self.fixed.move(self.text_entry, bx + mx, by + my * 2) + if self._tablet_mode(): + self.fixed.move(self.text_entry, bx + mx, 0) + else: + self.fixed.move(self.text_entry, bx + mx, by + my * 2) self.fixed.show() self.text_entry.connect('focus-out-event', self._text_focus_out_cb) self.text_entry.grab_focus() |