mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-11 02:57:39 +00:00
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:
@@ -10,12 +10,16 @@
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
enum class DailyTipsLayout{
|
||||
Horizontal,
|
||||
Vertical
|
||||
};
|
||||
|
||||
class DailyTipsDataRenderer;
|
||||
class DailyTipsPanel {
|
||||
static int uid;
|
||||
public:
|
||||
DailyTipsPanel(bool can_expand = true);
|
||||
DailyTipsPanel(const ImVec2& pos, const ImVec2& size, bool can_expand = true);
|
||||
DailyTipsPanel(bool can_expand = true, DailyTipsLayout layout = DailyTipsLayout::Vertical);
|
||||
void set_position(const ImVec2& pos);
|
||||
void set_size(const ImVec2& size);
|
||||
void set_can_expand(bool can_expand);
|
||||
@@ -28,7 +32,6 @@ public:
|
||||
void on_change_color_mode(bool is_dark);
|
||||
|
||||
protected:
|
||||
void render_header(const ImVec2& pos, const ImVec2& size);
|
||||
void render_controller_buttons(const ImVec2& pos, const ImVec2& size);
|
||||
void push_styles();
|
||||
void pop_styles();
|
||||
@@ -42,12 +45,12 @@ private:
|
||||
ImVec2 m_pos;
|
||||
float m_width;
|
||||
float m_height;
|
||||
float m_header_height;
|
||||
float m_content_height;
|
||||
float m_footer_height;
|
||||
int m_uid;
|
||||
bool m_first_enter{ false };
|
||||
bool m_is_dark{ false };
|
||||
DailyTipsLayout m_layout{ DailyTipsLayout::Vertical };
|
||||
};
|
||||
|
||||
class DailyTipsWindow {
|
||||
|
||||
Reference in New Issue
Block a user