Skip to content

Commit

Permalink
hideo-base: Removed MacOS specific code.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Sep 7, 2024
1 parent 7d182cf commit 1326714
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions src/apps/hideo-base/scafold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,15 @@ static Ui::BoxStyle TOOLBAR = {
};

Ui::Child aboutButton([[maybe_unused]] Mdi::Icon icon, String title) {
#ifdef __ck_sys_darwin__
return Ui::button(
[title](auto &n) {
Ui::showDialog(n, Kr::aboutDialog(title));
},
Ui::ButtonStyle::subtle(), title
);
#else
return Ui::button(
[title](auto &n) {
Ui::showDialog(n, Kr::aboutDialog(title));
},
Ui::ButtonStyle::subtle(), icon, title
);
#endif
}

Ui::Child controls(TitlebarStyle style) {
#ifdef __ck_sys_darwin__
return Ui::hflow(
4,
Ui::button(
Ui::bindBubble<App::RequestExitEvent>(),
Ui::ButtonStyle::subtle(),
Mdi::CLOSE
),
Ui::button(
Ui::bindBubble<App::RequestMinimizeEvent>(),
Ui::ButtonStyle::subtle(),
Mdi::MINUS
) | Ui::cond(style == TitlebarStyle::DEFAULT),
Ui::button(
Ui::bindBubble<App::RequestMaximizeEvent>(),
Ui::ButtonStyle::subtle(),
Mdi::PLUS
) | Ui::cond(style == TitlebarStyle::DEFAULT)
);
#else
return Ui::hflow(
4,
Ui::button(
Expand All @@ -74,21 +45,9 @@ Ui::Child controls(TitlebarStyle style) {
Mdi::CLOSE
)
);
#endif
}

Ui::Child titlebar(Mdi::Icon icon, String title, TitlebarStyle style) {
#ifdef __ck_sys_darwin__
return Ui::stack(
aboutButton(icon, title) | Ui::center(),
Ui::hflow(
controls(style),
Ui::grow(NONE)
)
) |
Ui::insets(8) |
Ui::dragRegion() | box(TOOLBAR);
#else
return Ui::hflow(
4,
aboutButton(icon, title),
Expand All @@ -97,7 +56,6 @@ Ui::Child titlebar(Mdi::Icon icon, String title, TitlebarStyle style) {
) |
Ui::insets(8) |
Ui::dragRegion() | box(TOOLBAR);
#endif
}

Ui::Child titlebar(Mdi::Icon icon, String title, Ui::Child tabs, TitlebarStyle style) {
Expand Down

0 comments on commit 1326714

Please sign in to comment.