Skip to content

Commit

Permalink
change cursor on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
zeptofine committed Oct 7, 2023
1 parent f957987 commit 81ac438
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions imdataset_creator/gui/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from collections.abc import Collection
from typing import TypeVar

from PySide6.QtCore import QRect, Qt, Signal, Slot, QSize
from PySide6.QtGui import QAction, QIcon, QMouseEvent
from PySide6.QtCore import QRect, QSize, Qt, Signal, Slot
from PySide6.QtGui import QAction, QCursor, QIcon, QMouseEvent
from PySide6.QtWidgets import (
QCheckBox,
QFrame,
Expand Down Expand Up @@ -76,6 +76,8 @@ def setup_widget(self):

self.group = QGroupBox()
self.descriptionwidget = QLabel(self.desc, self)
self.setCursor(QCursor(Qt.CursorShape.SizeVerCursor))

self.descriptionwidget.hide()
self.descriptionwidget.setWordWrap(True)

Expand Down Expand Up @@ -178,8 +180,7 @@ def mouseMoveEvent(self, event: QMouseEvent) -> None:
if self.previous_position is not None:
poschange = event.position() - self.previous_position
newsize = QSize(self.size().width(), int(self.size().height() + poschange.y()))
self.setMinimumSize(newsize)

self.setMinimumHeight(newsize.height())
self.previous_position = event.position()
return super().mouseMoveEvent(event)

Expand Down
2 changes: 1 addition & 1 deletion imdataset_creator/gui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def save_config(self):
cfg = self.get_config()
with self.cfg_path.open("w") as f:
json.dump(cfg, f, indent=4)
print("saved", cfg)
rprint("saved", cfg)

@catch_errors("Error saving")
@Slot()
Expand Down

0 comments on commit 81ac438

Please sign in to comment.