diff options
Diffstat (limited to 'GstInspector/GUI/pages.py')
-rw-r--r-- | GstInspector/GUI/pages.py | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/GstInspector/GUI/pages.py b/GstInspector/GUI/pages.py index 08f8f98..3fbea4e 100644 --- a/GstInspector/GUI/pages.py +++ b/GstInspector/GUI/pages.py @@ -114,21 +114,22 @@ class DetailsPage (Page): self.link_button.connect ("clicked", self.handle_link_button_clicked) self.link_button.show () - # Little hack to make the label inside the LinkButton align with all - # the others. The LinkButton has a margin around the label. A shadow - # (border) is drawn there on mouse over only, so it looks totally odd - # without this little adjustment. - button_req_width = self.link_button.size_request ()[0] - child_req_width = self.link_button.child.size_request ()[0] - extra_pad = (button_req_width - child_req_width) / 2 - children = [label] - children += iter_container (self.widgets.element_details_table, - left_attach = 1, right_attach = 2) - children += iter_container (self.widgets.plugin_details_table, - left_attach = 1, right_attach = 2) - for child in children: - if child != box: - child.props.xpad = extra_pad + if self.link_button.child is not None: + # Little hack to make the label inside the LinkButton align with all + # the others. The LinkButton has a margin around the label. A shadow + # (border) is drawn there on mouse over only, so it looks totally odd + # without this little adjustment. + button_req_width = self.link_button.size_request ()[0] + child_req_width = self.link_button.child.size_request ()[0] + extra_pad = (button_req_width - child_req_width) / 2 + children = [label] + children += iter_container (self.widgets.element_details_table, + left_attach = 1, right_attach = 2) + children += iter_container (self.widgets.plugin_details_table, + left_attach = 1, right_attach = 2) + for child in children: + if child != box: + child.props.xpad = extra_pad box.pack_start (self.link_button, False, False) |