FIX:fix warning for icon_size define

jira: none
Change-Id: I0393677c5c29354aeca41917daecc87721d9d9ce
(cherry picked from commit 97584e0a1e73a0ce2152ce88c1ffd58abfc96c73)
This commit is contained in:
zhou.xu
2024-10-18 14:47:03 +08:00
committed by Noisyfox
parent 6c79e8262a
commit 78229089bf
10 changed files with 52 additions and 61 deletions

View File

@@ -23,7 +23,9 @@
#include "BindDialog.hpp" #include "BindDialog.hpp"
namespace Slic3r { namespace GUI { namespace Slic3r { namespace GUI {
#define MATERIAL_ITEM_SIZE wxSize(FromDIP(52), FromDIP(50))
#define MATERIAL_REC_WHEEL_SIZE wxSize(FromDIP(17), FromDIP(16))
#define MAPPING_ITEM_REAL_SIZE wxSize(FromDIP(60), FromDIP(60))
wxDEFINE_EVENT(EVT_SET_FINISH_MAPPING, wxCommandEvent); wxDEFINE_EVENT(EVT_SET_FINISH_MAPPING, wxCommandEvent);
MaterialItem::MaterialItem(wxWindow *parent, wxColour mcolour, wxString mname) MaterialItem::MaterialItem(wxWindow *parent, wxColour mcolour, wxString mname)

View File

@@ -40,9 +40,7 @@
namespace Slic3r { namespace GUI { namespace Slic3r { namespace GUI {
#define MATERIAL_ITEM_SIZE wxSize(FromDIP(52), FromDIP(50))
#define MATERIAL_REC_WHEEL_SIZE wxSize(FromDIP(17), FromDIP(16))
#define MAPPING_ITEM_REAL_SIZE wxSize(FromDIP(60), FromDIP(60))
#define AMS_TOTAL_COUNT 4 #define AMS_TOTAL_COUNT 4
enum TrayType { enum TrayType {

View File

@@ -31,7 +31,8 @@ class wxTopLevelWindow;
class wxRect; class wxRect;
#define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) ((wxMAJOR_VERSION > major) || ((wxMAJOR_VERSION == major) && (wxMINOR_VERSION > minor)) || ((wxMAJOR_VERSION == major) && (wxMINOR_VERSION == minor) && (wxRELEASE_NUMBER >= release))) #define wxVERSION_EQUAL_OR_GREATER_THAN(major, minor, release) ((wxMAJOR_VERSION > major) || ((wxMAJOR_VERSION == major) && (wxMINOR_VERSION > minor)) || ((wxMAJOR_VERSION == major) && (wxMINOR_VERSION == minor) && (wxRELEASE_NUMBER >= release)))
#define ICON_SINGLE_SIZE FromDIP(16)//don't change,if need new value,self create in cpp
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))//don't change,if need new value,self create in cpp
namespace Slic3r { namespace Slic3r {
namespace GUI { namespace GUI {

View File

@@ -18,7 +18,7 @@ namespace GUI {
#define CTRL_BUTTON_NORMAL_COLOUR wxColour(255, 255, 255) #define CTRL_BUTTON_NORMAL_COLOUR wxColour(255, 255, 255)
#define CTRL_BUTTON_PRESSEN_COLOUR wxColour(150, 150, 150) #define CTRL_BUTTON_PRESSEN_COLOUR wxColour(150, 150, 150)
#define TABLE_HEAD_FONT Label::Body_13 #define TABLE_HEAD_FONT Label::Body_13
#define ICON_SIZE FromDIP(16)
class DeviceItem : public wxWindow class DeviceItem : public wxWindow
{ {

View File

@@ -320,7 +320,7 @@ MultiMachineManagerPage::MultiMachineManagerPage(wxWindow* parent)
m_table_head_panel->SetBackgroundColour(TABLE_HEAR_NORMAL_COLOUR); m_table_head_panel->SetBackgroundColour(TABLE_HEAR_NORMAL_COLOUR);
m_table_head_sizer = new wxBoxSizer(wxHORIZONTAL); m_table_head_sizer = new wxBoxSizer(wxHORIZONTAL);
m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE); m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
m_printer_name->SetBackgroundColor(head_bg); m_printer_name->SetBackgroundColor(head_bg);
m_printer_name->SetFont(TABLE_HEAD_FONT); m_printer_name->SetFont(TABLE_HEAD_FONT);
m_printer_name->SetCornerRadius(0); m_printer_name->SetCornerRadius(0);
@@ -343,7 +343,7 @@ MultiMachineManagerPage::MultiMachineManagerPage(wxWindow* parent)
}); });
m_task_name = new Button(m_table_head_panel, _L("Task Name"), "", wxNO_BORDER, ICON_SIZE); m_task_name = new Button(m_table_head_panel, _L("Task Name"), "", wxNO_BORDER, ICON_SINGLE_SIZE);
m_task_name->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR); m_task_name->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR);
m_task_name->SetFont(TABLE_HEAD_FONT); m_task_name->SetFont(TABLE_HEAD_FONT);
m_task_name->SetCornerRadius(0); m_task_name->SetCornerRadius(0);
@@ -353,7 +353,7 @@ MultiMachineManagerPage::MultiMachineManagerPage(wxWindow* parent)
m_status = new Button(m_table_head_panel, _L("Device Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE); m_status = new Button(m_table_head_panel, _L("Device Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
m_status->SetBackgroundColor(head_bg); m_status->SetBackgroundColor(head_bg);
m_status->SetFont(TABLE_HEAD_FONT); m_status->SetFont(TABLE_HEAD_FONT);
m_status->SetCornerRadius(0); m_status->SetCornerRadius(0);
@@ -376,7 +376,7 @@ MultiMachineManagerPage::MultiMachineManagerPage(wxWindow* parent)
}); });
m_action = new Button(m_table_head_panel, _L("Actions"), "", wxNO_BORDER, ICON_SIZE, false); m_action = new Button(m_table_head_panel, _L("Actions"), "", wxNO_BORDER, ICON_SINGLE_SIZE, false);
m_action->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR); m_action->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR);
m_action->SetFont(TABLE_HEAD_FONT); m_action->SetFont(TABLE_HEAD_FONT);
m_action->SetCornerRadius(0); m_action->SetCornerRadius(0);

View File

@@ -574,7 +574,7 @@ LocalTaskManagerPage::LocalTaskManagerPage(wxWindow* parent)
}); });
m_task_name = new Button(m_table_head_panel, _L("Task Name"), "", wxNO_BORDER, ICON_SIZE); m_task_name = new Button(m_table_head_panel, _L("Task Name"), "", wxNO_BORDER, ICON_SINGLE_SIZE);
m_task_name->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR); m_task_name->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR);
m_task_name->SetFont(TABLE_HEAD_FONT); m_task_name->SetFont(TABLE_HEAD_FONT);
m_task_name->SetCornerRadius(0); m_task_name->SetCornerRadius(0);
@@ -583,7 +583,7 @@ LocalTaskManagerPage::LocalTaskManagerPage(wxWindow* parent)
m_task_name->SetCenter(false); m_task_name->SetCenter(false);
m_table_head_sizer->Add(m_task_name, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_task_name, 0, wxALIGN_CENTER_VERTICAL, 0);
m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE); m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
m_printer_name->SetBackgroundColor(head_bg); m_printer_name->SetBackgroundColor(head_bg);
m_printer_name->SetFont(TABLE_HEAD_FONT); m_printer_name->SetFont(TABLE_HEAD_FONT);
m_printer_name->SetCornerRadius(0); m_printer_name->SetCornerRadius(0);
@@ -603,7 +603,7 @@ LocalTaskManagerPage::LocalTaskManagerPage(wxWindow* parent)
}); });
m_table_head_sizer->Add(m_printer_name, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_printer_name, 0, wxALIGN_CENTER_VERTICAL, 0);
m_status = new Button(m_table_head_panel, _L("Task Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE); m_status = new Button(m_table_head_panel, _L("Task Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
m_status->SetBackgroundColor(head_bg); m_status->SetBackgroundColor(head_bg);
m_status->SetFont(TABLE_HEAD_FONT); m_status->SetFont(TABLE_HEAD_FONT);
m_status->SetCornerRadius(0); m_status->SetCornerRadius(0);
@@ -623,7 +623,7 @@ LocalTaskManagerPage::LocalTaskManagerPage(wxWindow* parent)
}); });
m_table_head_sizer->Add(m_status, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_status, 0, wxALIGN_CENTER_VERTICAL, 0);
m_info = new Button(m_table_head_panel, _L("Info"), "", wxNO_BORDER, ICON_SIZE); m_info = new Button(m_table_head_panel, _L("Info"), "", wxNO_BORDER, ICON_SINGLE_SIZE);
m_info->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR); m_info->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR);
m_info->SetFont(TABLE_HEAD_FONT); m_info->SetFont(TABLE_HEAD_FONT);
m_info->SetCornerRadius(0); m_info->SetCornerRadius(0);
@@ -632,7 +632,7 @@ LocalTaskManagerPage::LocalTaskManagerPage(wxWindow* parent)
m_info->SetCenter(false); m_info->SetCenter(false);
m_table_head_sizer->Add(m_info, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_info, 0, wxALIGN_CENTER_VERTICAL, 0);
m_send_time = new Button(m_table_head_panel, _L("Sent Time"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE, false); m_send_time = new Button(m_table_head_panel, _L("Sent Time"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE, false);
m_send_time->SetBackgroundColor(head_bg); m_send_time->SetBackgroundColor(head_bg);
m_send_time->SetFont(TABLE_HEAD_FONT); m_send_time->SetFont(TABLE_HEAD_FONT);
m_send_time->SetCornerRadius(0); m_send_time->SetCornerRadius(0);
@@ -652,7 +652,7 @@ LocalTaskManagerPage::LocalTaskManagerPage(wxWindow* parent)
}); });
m_table_head_sizer->Add(m_send_time, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_send_time, 0, wxALIGN_CENTER_VERTICAL, 0);
m_action = new Button(m_table_head_panel, _L("Actions"), "", wxNO_BORDER, ICON_SIZE, false); m_action = new Button(m_table_head_panel, _L("Actions"), "", wxNO_BORDER, ICON_SINGLE_SIZE, false);
m_action->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR); m_action->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR);
m_action->SetFont(TABLE_HEAD_FONT); m_action->SetFont(TABLE_HEAD_FONT);
m_action->SetCornerRadius(0); m_action->SetCornerRadius(0);
@@ -946,7 +946,7 @@ CloudTaskManagerPage::CloudTaskManagerPage(wxWindow* parent)
m_task_name = new Button(m_table_head_panel, _L("Task Name"), "", wxNO_BORDER, ICON_SIZE); m_task_name = new Button(m_table_head_panel, _L("Task Name"), "", wxNO_BORDER, ICON_SINGLE_SIZE);
m_task_name->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR); m_task_name->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR);
m_task_name->SetFont(TABLE_HEAD_FONT); m_task_name->SetFont(TABLE_HEAD_FONT);
m_task_name->SetCornerRadius(0); m_task_name->SetCornerRadius(0);
@@ -955,7 +955,7 @@ CloudTaskManagerPage::CloudTaskManagerPage(wxWindow* parent)
m_task_name->SetCenter(false); m_task_name->SetCenter(false);
m_table_head_sizer->Add(m_task_name, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_task_name, 0, wxALIGN_CENTER_VERTICAL, 0);
m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE); m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
m_printer_name->SetBackgroundColor(head_bg); m_printer_name->SetBackgroundColor(head_bg);
m_printer_name->SetFont(TABLE_HEAD_FONT); m_printer_name->SetFont(TABLE_HEAD_FONT);
m_printer_name->SetCornerRadius(0); m_printer_name->SetCornerRadius(0);
@@ -975,7 +975,7 @@ CloudTaskManagerPage::CloudTaskManagerPage(wxWindow* parent)
}); });
m_table_head_sizer->Add(m_printer_name, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_printer_name, 0, wxALIGN_CENTER_VERTICAL, 0);
m_status = new Button(m_table_head_panel, _L("Task Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE); m_status = new Button(m_table_head_panel, _L("Task Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
m_status->SetBackgroundColor(head_bg); m_status->SetBackgroundColor(head_bg);
m_status->SetFont(TABLE_HEAD_FONT); m_status->SetFont(TABLE_HEAD_FONT);
m_status->SetCornerRadius(0); m_status->SetCornerRadius(0);
@@ -995,7 +995,7 @@ CloudTaskManagerPage::CloudTaskManagerPage(wxWindow* parent)
}); });
m_table_head_sizer->Add(m_status, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_status, 0, wxALIGN_CENTER_VERTICAL, 0);
m_info = new Button(m_table_head_panel, _L("Info"), "", wxNO_BORDER, ICON_SIZE); m_info = new Button(m_table_head_panel, _L("Info"), "", wxNO_BORDER, ICON_SINGLE_SIZE);
m_info->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR); m_info->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR);
m_info->SetFont(TABLE_HEAD_FONT); m_info->SetFont(TABLE_HEAD_FONT);
m_info->SetCornerRadius(0); m_info->SetCornerRadius(0);
@@ -1004,7 +1004,7 @@ CloudTaskManagerPage::CloudTaskManagerPage(wxWindow* parent)
m_info->SetCenter(false); m_info->SetCenter(false);
m_table_head_sizer->Add(m_info, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_info, 0, wxALIGN_CENTER_VERTICAL, 0);
m_send_time = new Button(m_table_head_panel, _L("Sent Time"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE, false); m_send_time = new Button(m_table_head_panel, _L("Sent Time"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE, false);
m_send_time->SetBackgroundColor(head_bg); m_send_time->SetBackgroundColor(head_bg);
m_send_time->SetFont(TABLE_HEAD_FONT); m_send_time->SetFont(TABLE_HEAD_FONT);
m_send_time->SetCornerRadius(0); m_send_time->SetCornerRadius(0);
@@ -1024,7 +1024,7 @@ CloudTaskManagerPage::CloudTaskManagerPage(wxWindow* parent)
}); });
m_table_head_sizer->Add(m_send_time, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_send_time, 0, wxALIGN_CENTER_VERTICAL, 0);
m_action = new Button(m_table_head_panel, _L("Actions"), "", wxNO_BORDER, ICON_SIZE, false); m_action = new Button(m_table_head_panel, _L("Actions"), "", wxNO_BORDER, ICON_SINGLE_SIZE, false);
m_action->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR); m_action->SetBackgroundColor(TABLE_HEAR_NORMAL_COLOUR);
m_action->SetFont(TABLE_HEAD_FONT); m_action->SetFont(TABLE_HEAD_FONT);
m_action->SetCornerRadius(0); m_action->SetCornerRadius(0);

View File

@@ -3,7 +3,7 @@
//#include "libslic3r/FlushVolCalc.hpp" //#include "libslic3r/FlushVolCalc.hpp"
#include "ObjColorDialog.hpp" #include "ObjColorDialog.hpp"
#include "BitmapCache.hpp" #include "BitmapCache.hpp"
#include "GUI.hpp" #include "GUI.hpp"//for ICON_SIZE
#include "I18N.hpp" #include "I18N.hpp"
#include "GUI_App.hpp" #include "GUI_App.hpp"
#include "MsgDialog.hpp" #include "MsgDialog.hpp"
@@ -28,8 +28,6 @@ const int CONTENT_BORDER = 3;
const int PANEL_WIDTH = 370; const int PANEL_WIDTH = 370;
const int COLOR_LABEL_WIDTH = 180; const int COLOR_LABEL_WIDTH = 180;
#undef ICON_SIZE
#define ICON_SIZE wxSize(FromDIP(16), FromDIP(16))
#define MIN_OBJCOLOR_DIALOG_WIDTH FromDIP(400) #define MIN_OBJCOLOR_DIALOG_WIDTH FromDIP(400)
#define FIX_SCROLL_HEIGTH FromDIP(400) #define FIX_SCROLL_HEIGTH FromDIP(400)
#define BTN_SIZE wxSize(FromDIP(58), FromDIP(24)) #define BTN_SIZE wxSize(FromDIP(58), FromDIP(24))

View File

@@ -10,8 +10,9 @@
namespace Slic3r { namespace Slic3r {
namespace GUI { namespace GUI {
#define MATERIAL_ITEM_SIZE wxSize(FromDIP(64), FromDIP(34))
#define MATERIAL_ITEM_REAL_SIZE wxSize(FromDIP(62), FromDIP(32))
#define MAPPING_ITEM_REAL_SIZE wxSize(FromDIP(48), FromDIP(45))
WX_DEFINE_LIST(AmsRadioSelectorList); WX_DEFINE_LIST(AmsRadioSelectorList);
class ScrolledWindow : public wxScrolledWindow { class ScrolledWindow : public wxScrolledWindow {
@@ -1142,7 +1143,7 @@ wxPanel* SendMultiMachinePage::create_page()
e.Skip(); e.Skip();
}); });
m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE); m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
m_printer_name->SetBackgroundColor(head_bg); m_printer_name->SetBackgroundColor(head_bg);
m_printer_name->SetCornerRadius(0); m_printer_name->SetCornerRadius(0);
m_printer_name->SetFont(TABLE_HEAD_FONT); m_printer_name->SetFont(TABLE_HEAD_FONT);
@@ -1164,7 +1165,7 @@ wxPanel* SendMultiMachinePage::create_page()
m_table_head_sizer->Add( 0, 0, 0, wxLEFT, FromDIP(10) ); m_table_head_sizer->Add( 0, 0, 0, wxLEFT, FromDIP(10) );
m_table_head_sizer->Add(m_printer_name, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_printer_name, 0, wxALIGN_CENTER_VERTICAL, 0);
m_device_status = new Button(m_table_head_panel, _L("Device Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE); m_device_status = new Button(m_table_head_panel, _L("Device Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
m_device_status->SetBackgroundColor(head_bg); m_device_status->SetBackgroundColor(head_bg);
m_device_status->SetFont(TABLE_HEAD_FONT); m_device_status->SetFont(TABLE_HEAD_FONT);
m_device_status->SetCornerRadius(0); m_device_status->SetCornerRadius(0);
@@ -1207,7 +1208,7 @@ wxPanel* SendMultiMachinePage::create_page()
//m_table_head_sizer->Add(m_task_status, 0, wxALIGN_CENTER_VERTICAL, 0); //m_table_head_sizer->Add(m_task_status, 0, wxALIGN_CENTER_VERTICAL, 0);
m_ams = new Button(m_table_head_panel, _L("AMS Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE, false); m_ams = new Button(m_table_head_panel, _L("Ams Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE, false);
m_ams->SetBackgroundColor(head_bg); m_ams->SetBackgroundColor(head_bg);
m_ams->SetCornerRadius(0); m_ams->SetCornerRadius(0);
m_ams->SetFont(TABLE_HEAD_FONT); m_ams->SetFont(TABLE_HEAD_FONT);
@@ -1228,7 +1229,7 @@ wxPanel* SendMultiMachinePage::create_page()
}); });
m_table_head_sizer->Add(m_ams, 0, wxALIGN_CENTER_VERTICAL, 0); m_table_head_sizer->Add(m_ams, 0, wxALIGN_CENTER_VERTICAL, 0);
m_refresh_button = new Button(m_table_head_panel, "", "mall_control_refresh", wxNO_BORDER, ICON_SIZE, false); m_refresh_button = new Button(m_table_head_panel, "", "mall_control_refresh", wxNO_BORDER, ICON_SINGLE_SIZE, false);
m_refresh_button->SetBackgroundColor(head_bg); m_refresh_button->SetBackgroundColor(head_bg);
m_refresh_button->SetCornerRadius(0); m_refresh_button->SetCornerRadius(0);
m_refresh_button->SetFont(TABLE_HEAD_FONT); m_refresh_button->SetFont(TABLE_HEAD_FONT);

View File

@@ -32,9 +32,8 @@ namespace GUI {
#define DESIGN_LARGE_COMBOBOX_SIZE wxSize(FromDIP(160), -1) #define DESIGN_LARGE_COMBOBOX_SIZE wxSize(FromDIP(160), -1)
#define DESIGN_INPUT_SIZE wxSize(FromDIP(50), -1) #define DESIGN_INPUT_SIZE wxSize(FromDIP(50), -1)
#define MATERIAL_ITEM_SIZE wxSize(FromDIP(64), FromDIP(34))
#define MATERIAL_ITEM_REAL_SIZE wxSize(FromDIP(62), FromDIP(32))
#define MAPPING_ITEM_REAL_SIZE wxSize(FromDIP(48), FromDIP(45))
#define THUMBNAIL_SIZE FromDIP(128) #define THUMBNAIL_SIZE FromDIP(128)

View File

@@ -4,12 +4,12 @@
#include "I18N.hpp" #include "I18N.hpp"
#include "Widgets/Label.hpp" #include "Widgets/Label.hpp"
#include "libslic3r/Utils.hpp" #include "libslic3r/Utils.hpp"
#include "GUI_App.hpp"//for ICON_SIZE (wxSize(FromDIP(16), FromDIP(16)))
namespace Slic3r { namespace Slic3r {
namespace GUI { namespace GUI {
#define THUMBNAIL_SIZE (wxSize(FromDIP(60), FromDIP(60))) #define THUMBNAIL_SIZE (wxSize(FromDIP(60), FromDIP(60)))
#define ICON_SIZE (wxSize(FromDIP(16), FromDIP(16)))
#define PRINT_ICON_SIZE (wxSize(FromDIP(18), FromDIP(18))) #define PRINT_ICON_SIZE (wxSize(FromDIP(18), FromDIP(18)))
wxIMPLEMENT_CLASS(SliceInfoPopup, PopupWindow); wxIMPLEMENT_CLASS(SliceInfoPopup, PopupWindow);
@@ -23,14 +23,6 @@ wxEND_EVENT_TABLE()
static wxColour BUTTON_BORDER_COL = wxColour(255, 255, 255); static wxColour BUTTON_BORDER_COL = wxColour(255, 255, 255);
inline int hex_digit_to_int(const char c)
{
return
(c >= '0' && c <= '9') ? int(c - '0') :
(c >= 'A' && c <= 'F') ? int(c - 'A') + 10 :
(c >= 'a' && c <= 'f') ? int(c - 'a') + 10 : -1;
}
inline float calc_gray(wxColour color) inline float calc_gray(wxColour color)
{ {
return 0.299 * (float) color.Red() + 0.587 * (float) color.Green() + 0.114 * (float) color.Blue(); return 0.299 * (float) color.Red() + 0.587 * (float) color.Green() + 0.114 * (float) color.Blue();