This commit is contained in:
sunsets
2023-09-11 11:10:12 +08:00
parent 205d475acb
commit 39bb8169a0
11 changed files with 69 additions and 5 deletions

View File

@@ -1027,6 +1027,8 @@ void Choice::BUILD() {
set_selection();
}
}*/
//B35
#if defined(__WIN32__) || defined(__WXMAC__)
if (m_opt.enum_def) {
if (auto& labels = m_opt.enum_def->labels(); !labels.empty())
{
@@ -1059,6 +1061,17 @@ void Choice::BUILD() {
set_selection();
}
}
#elif defined __linux__
if (m_opt.enum_def) {
if (auto& labels = m_opt.enum_def->labels(); !labels.empty()) {
bool localized = m_opt.enum_def->has_labels();
for (const std::string& el : labels)
temp->Append(localized ? _(from_u8(el)) : from_u8(el));
set_selection();
}
}
#endif
temp->Bind(wxEVT_MOUSEWHEEL, [this](wxMouseEvent& e) {
if (m_suppress_scroll && !m_is_dropped)

View File

@@ -26,6 +26,11 @@
#include <wx/timer.h>
//B35
#if defined __linux__
#include <boost/log/trivial.hpp>
#endif
namespace Slic3r {
namespace GUI {

View File

@@ -859,7 +859,10 @@ void MainFrame::create_preset_tabs()
add_created_tab(new TabPrinter(m_tabpanel), wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptFFF ? "printer" : "sla_printer");
//B4
m_printer_view = new PrinterWebView(m_tabpanel);
m_printer_view->Hide();
//B35
#if defined(__WIN32__) || defined(__WXMAC__)
m_printer_view->Hide();
#endif
#ifdef _MSW_DARK_MODE
if (!wxGetApp().tabs_as_menu())
dynamic_cast<Notebook *>(m_tabpanel)->AddPage(m_printer_view, _L("Device"), "tab_monitor_active");
@@ -873,7 +876,10 @@ void MainFrame::create_preset_tabs()
if (strlang != "")
url = wxString::Format("file://%s/web/guide/index.html?lang=%s", from_u8(resources_dir()), strlang);
m_guide_view->load_url(url);
m_guide_view->Hide();
//B35
#if defined(__WIN32__) || defined(__WXMAC__)
m_guide_view->Hide();
#endif
#ifdef _MSW_DARK_MODE
if (!wxGetApp().tabs_as_menu())
dynamic_cast<Notebook *>(m_tabpanel)->AddPage(m_guide_view, _L("Guide"), "userguide");

View File

@@ -25,6 +25,11 @@
#include "wx/textctrl.h"
#include <wx/timer.h>
//B35
#if defined __linux__
#include <boost/log/trivial.hpp>
#endif
namespace Slic3r {
namespace GUI {

View File

@@ -5,6 +5,12 @@
#include "../wxExtensions.hpp"
#include "StateHandler.hpp"
#include "PopupWindow.hpp"
//B35
#if defined __linux__
#include <boost/date_time/posix_time/posix_time.hpp>
#include "wx/dcbuffer.h"
#include "wx/display.h"
#endif
#define DD_NO_CHECK_ICON 0x0001
#define DD_NO_TEXT 0x0002

View File

@@ -6,6 +6,11 @@
#define LB_HYPERLINK 0x0020
#define LB_PROPAGATE_MOUSE_EVENT 0x0040
//B35
#if defined __linux__
#include <wx/settings.h>
#include "wx/dcclient.h"
#endif
class Label : public wxStaticText
{

View File

@@ -3,6 +3,13 @@
#include "../wxExtensions.hpp"
//B35
#if defined __linux__
#include <wx/panel.h>
#include <wx/wx.h>
#endif
class RoundedRectangle : public wxWindow
{
public:

View File

@@ -5,6 +5,13 @@
#include "StateColor.hpp"
//B35
#if defined __linux__
#include<memory>
#include <wx/wx.h>
#endif
wxDECLARE_EVENT(EVT_ENABLE_CHANGED, wxCommandEvent);
class StateHandler : public wxEvtHandler

View File

@@ -19,6 +19,11 @@
#elif defined __linux__
#include <gtk/gtk.h>
#define WEBKIT_API
//B35
#if defined __linux__
#include <boost/log/trivial.hpp>
#endif
struct WebKitWebView;
struct WebKitJavascriptResult;
extern "C" {