Skip to content

Commit

Permalink
Closes #288
Browse files Browse the repository at this point in the history
  • Loading branch information
quicklizard99 committed Apr 26, 2016
2 parents e1464f8 + 78e31d9 commit c24414f
Show file tree
Hide file tree
Showing 10 changed files with 424 additions and 187 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ This is an overview of major changes. Refer to the git repository for a full log

Version 0.1.28
-------------
- Fixed #288 - Minimap navigator
- Fixed #286 - Disable default template command when the default template selected
- Fixed #284 - Document info view to contain links
- Fixed #281 - Don't make images read-only
Expand Down
29 changes: 6 additions & 23 deletions inselect/gui/info_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from inselect.lib.utils import format_dt_display

from .toggle_widget_label import ToggleWidgetLabel
from .popup_panel import PopupPanel
from .utils import report_to_user


Expand All @@ -20,8 +20,7 @@ def reveal_path(path):
if sys.platform.startswith("win"):
explorer = QProcessEnvironment.systemEnvironment().searchInPath("explorer.exe")
if not explorer:
# Handle gracefully
pass
raise ValueError('Explorer could not be located')
else:
if not path.is_dir():
arg = u"/select,{0}".format(path)
Expand Down Expand Up @@ -69,17 +68,11 @@ class BoldLabel(QLabel):
pass


class InfoWidget(QGroupBox):
class InfoWidget(PopupPanel):
"""Shows information about the document and the scanned image
"""

STYLESHEET = """
ToggleWidgetLabel {
text-decoration: none;
font-weight: bold;
color: black;
}
BoldLabel {
font-weight: bold;
}
Expand All @@ -89,12 +82,7 @@ class InfoWidget(QGroupBox):
}
"""


def __init__(self, parent=None):
super(InfoWidget, self).__init__(parent)

self.setStyleSheet(self.STYLESHEET)

layout = QFormLayout()

self._document_path = RevealPathLabel()
Expand Down Expand Up @@ -136,15 +124,10 @@ def __init__(self, parent=None):
labels_widget.setLayout(layout)
labels_widget.setVisible(False)

# Show the labels about the toggle
vlayout = QVBoxLayout()
vlayout.setAlignment(Qt.AlignTop)
vlayout.addWidget(labels_widget)
vlayout.addWidget(ToggleWidgetLabel('Information', labels_widget))
# Widget containing toggle label and container
super(InfoWidget, self).__init__('Information', labels_widget, parent)

self.setLayout(vlayout)

# self.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum)
self.setStyleSheet(self.STYLESHEET)

def set_document(self, document):
"""Updates controls to reflect the document. Clears controls if
Expand Down
Loading

0 comments on commit c24414f

Please sign in to comment.