OrcaSlicer icon indicating copy to clipboard operation
OrcaSlicer copied to clipboard

Add spacing between icons of objects list item if it has multiple icons

Open yw4z opened this issue 1 year ago • 1 comments

New vs Old Screenshot-20240510060352

• used font size for spacing width. this also gives better result for scaling

how to get all 3 icons for same list item • Pick a step file or use a model with open mesh • Use cut and add connector then perform cut. ignore dialog for fix

Another scenario for multiple icons • Add a cube • Add a modifier • Cut with pins Screenshot-20240510192034

I'm sure there are many other combinations for multiple icons with / without cut

Also found this minor bug • Scaling not works on that icons on original source if scaling changes while orca running

yw4z avatar May 10 '24 16:05 yw4z

@SoftFever updated code change. yes !bmps.empty() is simpler choose for condition

        if (node->has_warning_icon())
            bmps.emplace_back(node->warning_icon_name() == WarningIcon ? m_warning_bmp : m_warning_manifold_bmp);
        if (node->has_lock()) {
            if (!bmps.empty()) // ORCA: Add spacing between icons if there are multiple
                bmps.emplace_back(create_scaled_bitmap("dot", nullptr, int(wxGetApp().em_unit() / 10) * 4));
            bmps.emplace_back(m_lock_bmp);
        }
        if (is_volume_node) {
            if (!bmps.empty()) // ORCA: Add spacing between icons if there are multiple
                bmps.emplace_back(create_scaled_bitmap("dot", nullptr, int(wxGetApp().em_unit() / 10) * 4));
            bmps.emplace_back(
                node->is_text_volume() ? m_text_volume_bmps[vol_type] :
                node->is_svg_volume() ? m_svg_volume_bmps[vol_type] : 
                m_volume_bmps[vol_type]);
        }

yw4z avatar May 18 '24 16:05 yw4z