Use self.layout's width and height for available_image_X
Thomas Ross
3 years ago
1643 | 1643 | self.layout.move(self.imageview, x_shift, y_shift) |
1644 | 1644 | |
1645 | 1645 | def available_image_width(self): |
1646 | width = self.window.get_size()[0] | |
1647 | if not self.fullscreen_mode: | |
1648 | if self.thumbpane_show: | |
1649 | width -= self.thumbscroll.size_request().width | |
1650 | return width | |
1646 | return self.layout.get_allocation().width | |
1651 | 1647 | |
1652 | 1648 | def available_image_height(self): |
1653 | height = self.window.get_size()[1] | |
1654 | if not self.fullscreen_mode: | |
1655 | height -= self.menubar.size_request().height # TODO | |
1656 | if self.toolbar_show: | |
1657 | height -= self.toolbar.size_request().height | |
1658 | if self.statusbar_show: | |
1659 | height -= self.statusbar.size_request().height | |
1660 | return height | |
1649 | return self.layout.get_allocation().height | |
1661 | 1650 | |
1662 | 1651 | def save_image(self, action, parameter, data): |
1663 | 1652 | if self.action_group.lookup_action("save-image").get_enabled(): |