Skip to content

Commit

Permalink
update tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
xinntao committed Aug 7, 2022
1 parent 48dded3 commit 8dc3cba
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions handyview/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ def switch_preview_canvas(parent):


def select_basic_tab(parent):
return new_action(parent, 'Basic', icon_name='main_canvas.png', slot=parent.select_basic_tab)
return new_action(parent, 'Basic', icon_name='image.png', slot=parent.select_basic_tab)


def select_crop_tab(parent):
return new_action(parent, 'Crop', icon_name='compare_canvas.png', slot=parent.select_crop_tab)
return new_action(parent, 'Crop', icon_name='crop.png', slot=parent.select_crop_tab)


def select_video_tab(parent):
return new_action(parent, 'Video', icon_name='preview_canvas.png', slot=parent.select_video_tab)
return new_action(parent, 'Video', icon_name='video.png', slot=parent.select_video_tab)


# ---------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion handyview/canvas_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def init_widgets_layout(self):
main_layout.addWidget(self.infoButton, 58, 0, 1, 1)
main_layout.addLayout(controlLayout, 60, 0, -1, 49)

self.qviews[0].set_shown_text(['Click Open to open ·two· videos for comparison!'])
self.qviews[0].set_shown_text(['Click Open to open ·two· videos for comparison!', 'bug 出没 - 还在测试中'])

def keyPressEvent(self, event):
modifiers = QApplication.keyboardModifiers()
Expand Down
14 changes: 11 additions & 3 deletions handyview/handyviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,17 @@ def __init__(self, parent, hvdb):
self.canvas = Canvas(self, hvdb)
self.canvas_crop = CanvasCrop(self, hvdb)
self.canvas_video = CanvasVideo(self)
self.tabs.addTab(self.canvas, 'View')
self.tabs.addTab(self.canvas_crop, 'Crop')
self.tabs.addTab(self.canvas_video, 'Video')
self.tabs.addTab(self.canvas, 'View 图像')
self.tabs.addTab(self.canvas_crop, 'Crop 裁剪')
self.tabs.addTab(self.canvas_video, 'Video 视频')
self.tabs.setTabIcon(0, QIcon(os.path.join(ROOT_DIR, 'icons/image.png')))
self.tabs.setTabIcon(1, QIcon(os.path.join(ROOT_DIR, 'icons/crop.png')))
self.tabs.setTabIcon(2, QIcon(os.path.join(ROOT_DIR, 'icons/video.png')))
font = self.tabs.font()
font.setPointSize(13)
# font.setBold(True)
self.tabs.setFont(font)

layout.addWidget(self.tabs)

self.tabs.currentChanged.connect(self.tabsCurrentChanged)
Expand Down
Binary file added icons/crop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/video.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8dc3cba

Please sign in to comment.