mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer
This commit is contained in:
		
						commit
						89fb8fd43c
					
				
					 3 changed files with 25 additions and 6 deletions
				
			
		|  | @ -3607,7 +3607,15 @@ bool GLCanvas3D::_init_main_toolbar() | |||
|     item.sprite_id = 10; | ||||
|     item.left.toggable = true; | ||||
|     item.left.action_callback = [this]() { if (m_canvas != nullptr) wxPostEvent(m_canvas, SimpleEvent(EVT_GLTOOLBAR_LAYERSEDITING)); }; | ||||
|     item.visibility_callback = [this]()->bool { return m_process->current_printer_technology() == ptFFF; }; | ||||
|     item.visibility_callback = [this]()->bool | ||||
|     { | ||||
|         bool res = m_process->current_printer_technology() == ptFFF; | ||||
|         // turns off if changing printer technology
 | ||||
|         if (!res && m_main_toolbar.is_item_visible("layersediting") && m_main_toolbar.is_item_pressed("layersediting")) | ||||
|             force_main_toolbar_left_action(get_main_toolbar_item_id("layersediting")); | ||||
| 
 | ||||
|         return res; | ||||
|     }; | ||||
|     item.enabling_callback = []()->bool { return wxGetApp().plater()->can_layers_editing(); }; | ||||
|     if (!m_main_toolbar.add_item(item)) | ||||
|         return false; | ||||
|  |  | |||
|  | @ -9,6 +9,11 @@ | |||
| namespace Slic3r { | ||||
| namespace GUI { | ||||
| 
 | ||||
| enum { | ||||
|     DLG_WIDTH   = 90, | ||||
|     DLG_HEIGHT  = 60 | ||||
| }; | ||||
| 
 | ||||
| KBShortcutsDialog::KBShortcutsDialog() | ||||
|     : DPIDialog(NULL, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _(L("Keyboard Shortcuts")), | ||||
|      wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) | ||||
|  | @ -34,7 +39,11 @@ KBShortcutsDialog::KBShortcutsDialog() | |||
| 
 | ||||
|     fill_shortcuts(); | ||||
| 
 | ||||
|     auto panel = new wxPanel(this); | ||||
|     const int em = em_unit(); | ||||
|     const wxSize& size = wxSize(DLG_WIDTH * em, DLG_HEIGHT * em); | ||||
|     panel = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, size); | ||||
|     panel->SetScrollbars(1, 20, 1, 2); | ||||
| 
 | ||||
|     auto main_grid_sizer = new wxFlexGridSizer(2, 10, 10); | ||||
|     panel->SetSizer(main_grid_sizer); | ||||
|     main_sizer->Add(panel, 1, wxEXPAND | wxALL, 0); | ||||
|  | @ -207,7 +216,9 @@ void KBShortcutsDialog::on_dpi_changed(const wxRect &suggested_rect) | |||
| 
 | ||||
|     msw_buttons_rescale(this, em, { wxID_OK }); | ||||
| 
 | ||||
|     const wxSize& size = wxSize(85 * em, 75 * em); | ||||
|     const wxSize& size = wxSize(DLG_WIDTH * em, DLG_HEIGHT * em); | ||||
| 
 | ||||
|     panel->SetMinSize(size); | ||||
| 
 | ||||
|     SetMinSize(size); | ||||
|     Fit(); | ||||
|  |  | |||
|  | @ -23,10 +23,10 @@ class KBShortcutsDialog : public DPIDialog | |||
|     typedef std::vector< Shortcut >             Shortcuts; | ||||
|     typedef std::vector< std::pair<wxString, std::pair<Shortcuts, PLACED_SIZER_ID>> >   ShortcutsVec; | ||||
| 
 | ||||
|     wxString text_info {wxEmptyString}; | ||||
|     wxScrolledWindow*               panel; | ||||
| 
 | ||||
|     ShortcutsVec    m_full_shortcuts; | ||||
|     ScalableBitmap  m_logo_bmp; | ||||
|     ShortcutsVec                    m_full_shortcuts; | ||||
|     ScalableBitmap                  m_logo_bmp; | ||||
|     std::vector<wxStaticBitmap*>    m_head_bitmaps; | ||||
| 
 | ||||
| public: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bubnikv
						bubnikv