From c34f17d5f47ab0d7ab5fecef7f4a0e32f3e09e33 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 27 Sep 2022 23:58:23 +0200 Subject: [PATCH] hourglass: add defaults for x/y position Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4ea1c1e5f6c61e00713c80d9017a4e3134785dcc Author: vanhofen Date: 2022-09-27 (Tue, 27 Sep 2022) Origin message was: ------------------ - hourglass: add defaults for x/y position ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/test_menu.cpp | 2 +- src/gui/widget/hourglass.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index 95d5577b9..825076611 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -1238,7 +1238,7 @@ int CTestMenu::exec(CMenuTarget *parent, const std::string &actionKey) } else if (actionKey == "hourglass") { - CHourGlass hg(20, 20); + CHourGlass hg; hg.paint(); sleep(10); hg.hide(); diff --git a/src/gui/widget/hourglass.h b/src/gui/widget/hourglass.h index fe942fe9c..da5bbe118 100644 --- a/src/gui/widget/hourglass.h +++ b/src/gui/widget/hourglass.h @@ -28,6 +28,8 @@ #include #include +#include + //! CHourglass shows a small image chain with timed order to visualize running processes or breaks. /*! CHourglass shows only a timer controlled image chain, CHourglassProc will run an additional process. @@ -78,8 +80,8 @@ class CHourGlass : public CComponentsShapeSquare * @see class CComponentsShapeSquare() */ - CHourGlass( const int x_pos, - const int y_pos, + CHourGlass( const int x_pos = CFrameBuffer::getInstance()->getScreenX() + OFFSET_INNER_MID, + const int y_pos = CFrameBuffer::getInstance()->getScreenY() + OFFSET_INNER_MID, const int w = 48, const int h = 48, const std::string &image_basename = "hourglass",