mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Auto scale of the toolbars in respect to the canvas size
This commit is contained in:
parent
d928d6e47e
commit
e7f3206250
9 changed files with 83 additions and 7 deletions
|
@ -627,6 +627,16 @@ float GLToolbar::get_main_size() const
|
|||
return size * m_layout.scale;
|
||||
}
|
||||
|
||||
int GLToolbar::get_visible_items_cnt() const
|
||||
{
|
||||
int cnt = 0;
|
||||
for (unsigned int i = 0; i < (unsigned int)m_items.size(); ++i)
|
||||
if (m_items[i]->is_visible() && !m_items[i]->is_separator())
|
||||
cnt++;
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
void GLToolbar::do_action(GLToolbarItem::EActionType type, int item_id, GLCanvas3D& parent, bool check_hover)
|
||||
{
|
||||
if ((m_pressed_toggable_id == -1) || (m_pressed_toggable_id == item_id))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue