Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-04-25 16:06:44 +0300
committerYuSanka <yusanka@gmail.com>2019-04-25 16:09:12 +0300
commit708037158e78dfe0552b3ed5d9498da1832e031b (patch)
tree0400c2bc1421a673f4e1ff599ddad83a40580fd6 /src/slic3r/GUI/PrintHostDialogs.cpp
parent3f978f6afe95411ebe25fd8fcb38986b6d8ecbc4 (diff)
Added msw_buttons_rescale() - Function for a scaling Dialog's buttons under MSW
Diffstat (limited to 'src/slic3r/GUI/PrintHostDialogs.cpp')
-rw-r--r--src/slic3r/GUI/PrintHostDialogs.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/slic3r/GUI/PrintHostDialogs.cpp b/src/slic3r/GUI/PrintHostDialogs.cpp
index 4fb03594b..2b6e4f2a2 100644
--- a/src/slic3r/GUI/PrintHostDialogs.cpp
+++ b/src/slic3r/GUI/PrintHostDialogs.cpp
@@ -19,6 +19,7 @@
#include "MsgDialog.hpp"
#include "I18N.hpp"
#include "../Utils/PrintHost.hpp"
+#include "wxExtensions.hpp"
namespace fs = boost::filesystem;
@@ -136,8 +137,6 @@ PrintHostQueueDialog::PrintHostQueueDialog(wxWindow *parent)
, on_error_evt(this, EVT_PRINTHOST_ERROR, &PrintHostQueueDialog::on_error, this)
, on_cancel_evt(this, EVT_PRINTHOST_CANCEL, &PrintHostQueueDialog::on_cancel, this)
{
- enum { HEIGHT = 60, WIDTH = 30, SPACING = 5 };
-
const auto em = GetTextExtent("m").x;
SetSize(wxSize(HEIGHT * em, WIDTH * em));
@@ -202,6 +201,18 @@ void PrintHostQueueDialog::append_job(const PrintHostJob &job)
job_list->AppendItem(fields, static_cast<wxUIntPtr>(ST_NEW));
}
+void PrintHostQueueDialog::on_dpi_changed(const wxRect &suggested_rect)
+{
+ const int& em = em_unit();
+
+ msw_buttons_rescale(this, em, { wxID_DELETE, wxID_CANCEL, btn_error->GetId() });
+
+ SetMinSize(wxSize(HEIGHT * em, WIDTH * em));
+
+ Fit();
+ Refresh();
+}
+
PrintHostQueueDialog::JobState PrintHostQueueDialog::get_state(int idx)
{
wxCHECK_MSG(idx >= 0 && idx < job_list->GetItemCount(), ST_ERROR, "Out of bounds access to job list");