summaryrefslogtreecommitdiff
path: root/src/modinfodialogimages.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-06-27 09:06:41 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-07-02 10:10:19 -0400
commit933a2c7d1086ebc87ee2d214deaa3752ea8c6cf1 (patch)
tree624e0e5073a13e7186d03c51568f04d06af8eef2 /src/modinfodialogimages.h
parentc2df11298b3be4919a660206e5100ee6dbdecd1c (diff)
added keyboard navigation for page down/up, end/home
changed to draw the full image background only behind the image
Diffstat (limited to 'src/modinfodialogimages.h')
-rw-r--r--src/modinfodialogimages.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/modinfodialogimages.h b/src/modinfodialogimages.h
index c7f46975..5ce66d5d 100644
--- a/src/modinfodialogimages.h
+++ b/src/modinfodialogimages.h
@@ -227,6 +227,16 @@ private:
: path(std::move(path))
{
}
+
+ void ensureOriginalLoaded()
+ {
+ if (original.isNull()) {
+ if (!original.load(path)) {
+ qCritical() << "failed to load image from " << path;
+ failed = true;
+ }
+ }
+ }
};
struct Colors
@@ -258,6 +268,7 @@ private:
void add(File f);
void addFiltered(File* f);
+ bool empty() const;
std::size_t size() const;
void switchToAll();
@@ -308,7 +319,7 @@ private:
void onFilterChanged();
void select(std::size_t i);
- void moveSelection(int direction);
+ void moveSelection(int by);
void ensureVisible(std::size_t i);
std::size_t fileIndexAtPos(const QPoint& p) const;