mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Forcing of explicit SetWidth for the columns under OSX, as an attempt to fix a narrow column width on 4(5)K monitors under OSX
This commit is contained in:
parent
a27026aa03
commit
7e060f84bd
1 changed files with 23 additions and 8 deletions
|
@ -255,21 +255,30 @@ void ObjectList::create_objects_ctrl()
|
||||||
EnableDropTarget(wxDF_UNICODETEXT);
|
EnableDropTarget(wxDF_UNICODETEXT);
|
||||||
#endif // wxUSE_DRAG_AND_DROP && wxUSE_UNICODE
|
#endif // wxUSE_DRAG_AND_DROP && wxUSE_UNICODE
|
||||||
|
|
||||||
|
const int em = wxGetApp().em_unit();
|
||||||
|
|
||||||
// column ItemName(Icon+Text) of the view control:
|
// column ItemName(Icon+Text) of the view control:
|
||||||
// And Icon can be consisting of several bitmaps
|
// And Icon can be consisting of several bitmaps
|
||||||
AppendColumn(new wxDataViewColumn(_(L("Name")), new BitmapTextRenderer(),
|
AppendColumn(new wxDataViewColumn(_(L("Name")), new BitmapTextRenderer(),
|
||||||
colName, 20*wxGetApp().em_unit()/*200*/, wxALIGN_LEFT, wxDATAVIEW_COL_RESIZABLE));
|
colName, 20*em, wxALIGN_LEFT, wxDATAVIEW_COL_RESIZABLE));
|
||||||
|
|
||||||
// column PrintableProperty (Icon) of the view control:
|
// column PrintableProperty (Icon) of the view control:
|
||||||
AppendBitmapColumn(" ", colPrint, wxDATAVIEW_CELL_INERT, int(2 * wxGetApp().em_unit()),
|
AppendBitmapColumn(" ", colPrint, wxDATAVIEW_CELL_INERT, 3*em,
|
||||||
wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE);
|
wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE);
|
||||||
|
|
||||||
// column Extruder of the view control:
|
// column Extruder of the view control:
|
||||||
AppendColumn(create_objects_list_extruder_column(4));
|
AppendColumn(create_objects_list_extruder_column(4));
|
||||||
|
|
||||||
// column ItemEditing of the view control:
|
// column ItemEditing of the view control:
|
||||||
AppendBitmapColumn(_(L("Editing")), colEditing, wxDATAVIEW_CELL_INERT, int(2.5 * wxGetApp().em_unit())/*25*/,
|
AppendBitmapColumn(_(L("Editing")), colEditing, wxDATAVIEW_CELL_INERT, 3*em,
|
||||||
wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE);
|
wxALIGN_CENTER_HORIZONTAL, wxDATAVIEW_COL_RESIZABLE);
|
||||||
|
|
||||||
|
if (wxOSX)
|
||||||
|
{
|
||||||
|
GetColumn(colName)->SetWidth(20*em);
|
||||||
|
GetColumn(colPrint)->SetWidth(3*em);
|
||||||
|
GetColumn(colExtruder)->SetWidth(8*em);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectList::create_popup_menus()
|
void ObjectList::create_popup_menus()
|
||||||
|
@ -822,12 +831,18 @@ void ObjectList::list_manipulation(bool evt_context_menu/* = false*/)
|
||||||
show_context_menu(evt_context_menu);
|
show_context_menu(evt_context_menu);
|
||||||
else if (title == _("Name"))
|
else if (title == _("Name"))
|
||||||
{
|
{
|
||||||
int obj_idx, vol_idx;
|
if (wxOSX)
|
||||||
get_selected_item_indexes(obj_idx, vol_idx, item);
|
show_context_menu(evt_context_menu); // return context menu under OSX (related to #2909)
|
||||||
|
|
||||||
if (is_windows10() && get_mesh_errors_count(obj_idx, vol_idx) > 0 &&
|
if (is_windows10())
|
||||||
pt.x > 2*wxGetApp().em_unit() && pt.x < 4*wxGetApp().em_unit() )
|
{
|
||||||
fix_through_netfabb();
|
int obj_idx, vol_idx;
|
||||||
|
get_selected_item_indexes(obj_idx, vol_idx, item);
|
||||||
|
|
||||||
|
if (get_mesh_errors_count(obj_idx, vol_idx) > 0 &&
|
||||||
|
pt.x > 2*wxGetApp().em_unit() && pt.x < 4*wxGetApp().em_unit() )
|
||||||
|
fix_through_netfabb();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
#ifndef __WXMSW__
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue