mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-24 03:12:07 +00:00
FIX: StaticGroup constriant layout badge on macOS
Change-Id: Ia93c91b990ec3f5fef3eae57d48ca71b4a0841e6 Jira: STUDIO-10383 (cherry picked from commit 88521a06d12cd4ebbcb8e98d8c929e9815aa71de)
This commit is contained in:
@@ -16,6 +16,7 @@ void set_tag_when_enter_full_screen(bool isfullscreen);
|
||||
void set_title_colour_after_set_title(void * window);
|
||||
void initGestures(void * view, wxEvtHandler * handler);
|
||||
void openFolderForFile(wxString const & file);
|
||||
void StaticGroup_layoutBadge(void * group, void * badge);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -417,3 +417,12 @@ void initGestures(void * view, wxEvtHandler * handler)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void StaticGroup_layoutBadge(void * group, void * badge)
|
||||
{
|
||||
NSView * vg = (NSView *)group;
|
||||
NSView * vb = (NSView *)badge;
|
||||
vb.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
[vg addConstraint: [NSLayoutConstraint constraintWithItem:vb attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:vg attribute:NSLayoutAttributeTop multiplier:1.0 constant:15]];
|
||||
[vg addConstraint: [NSLayoutConstraint constraintWithItem:vb attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:vg attribute:NSLayoutAttributeRight multiplier:1.0 constant:-1]];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user