ENH: dailytips modification

1. modify closing behavior
2. dailytips can adjust self size according to the canvas size. And also adjust
   GodeViewer legend window size
3. fix a button text encoding bug
4. support vertical/horizontal layout(horizontal layout currently not used)

jira: new

Change-Id: I8e0b6e85c455d0608d7388fb441829c1991ad01f
This commit is contained in:
liz.li
2023-11-03 15:52:56 +08:00
committed by Lane.Wei
parent 700a9bc8e4
commit 05d714814f
6 changed files with 144 additions and 102 deletions

View File

@@ -23,7 +23,7 @@ public:
SlicingProgressNotification(const NotificationData& n, NotificationIDProvider& id_provider, wxEvtHandler* evt_handler, std::function<bool()> callback)
: PopNotification(n, id_provider, evt_handler)
, m_cancel_callback(callback)
, m_dailytips_panel(new DailyTipsPanel(true))
, m_dailytips_panel(new DailyTipsPanel(true, DailyTipsLayout::Vertical))
{
set_progress_state(SlicingProgressState::SP_NO_SLICING);
}
@@ -65,6 +65,7 @@ protected:
int get_duration() override;
protected:
ImVec2 m_window_pos;
float m_percentage{ 0.0f };
int64_t m_before_complete_start;
// if returns false, process was already canceled