Skip to content

Commit

Permalink
style tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Sep 18, 2024
1 parent fc79258 commit 2ed9c30
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 34 deletions.
46 changes: 42 additions & 4 deletions src/bedsidemon/about_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <ruis/widget/label/gap.hpp>
#include <ruis/widget/label/text.hpp>

#include "style.hpp"

using namespace std::string_literals;

using namespace ruis::length_literals;
Expand All @@ -32,14 +34,11 @@ using namespace bedsidemon;

extern const char* const program_version;

namespace m {
using namespace ruis::make;
} // namespace m

namespace {
std::vector<utki::shared_ref<ruis::widget>> make_contents(utki::shared_ref<ruis::context> c)
{
constexpr auto font_size_program_title = 20_pp;
constexpr auto font_size = 16_pp;
constexpr auto color_program_title = 0xff00ffff;

constexpr auto gap_paragraph = 20_pp;
Expand Down Expand Up @@ -75,6 +74,45 @@ std::vector<utki::shared_ref<ruis::widget>> make_contents(utki::shared_ref<ruis:
}
}
),
m::row(c,
{},
{
m::text(c,
{
.text_params{
.font_size = font_size
}
},
U"Powered by"s
),
m::text(c,
{
.color_params{
.color = 0xff8080ff
},
.text_params{
.font_size = font_size
}
},
U" ruis"s
),
m::text(c,
{
.text_params{
.font_size = font_size
}
},
U" GUI"s
)
}
),
m::gap(c,
{
.layout_params{
.dims = {0_px, gap_paragraph}
}
}
),
m::text(c,
{},
U"Copyright (C) 2024 Gagistech Oy <[email protected]>"s
Expand Down
2 changes: 2 additions & 0 deletions src/bedsidemon/dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ using namespace std::string_view_literals;

using namespace ruis;

namespace {
namespace m {
using namespace ruis::make;
} // namespace m
} // namespace

namespace {
constexpr auto color_dialog_surroundings = 0xb0000000;
Expand Down
6 changes: 0 additions & 6 deletions src/bedsidemon/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ using namespace ruis::length_literals;

using namespace bedsidemon;

namespace {
namespace m {
using namespace ruis::make;
} // namespace m
} // namespace

namespace {
std::vector<utki::shared_ref<ruis::widget>> make_buttons(utki::shared_ref<ruis::context> c)
{
Expand Down
4 changes: 0 additions & 4 deletions src/bedsidemon/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ using namespace ruis::length_literals;

using namespace bedsidemon;

namespace m {
using namespace ruis::make;
} // namespace m

namespace {
constexpr auto size_close_button = 40_pp;
} // namespace
Expand Down
5 changes: 1 addition & 4 deletions src/bedsidemon/quit_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <ruis/widget/label/text.hpp>

#include "application.hpp"
#include "style.hpp"

using namespace std::string_literals;
using namespace std::string_view_literals;
Expand All @@ -35,10 +36,6 @@ using namespace ruis::length_literals;

using namespace bedsidemon;

namespace m {
using namespace ruis::make;
} // namespace m

namespace {
constexpr auto dimension_gap = 30_pp;
constexpr auto dimension_button_width = 100_pp;
Expand Down
4 changes: 0 additions & 4 deletions src/bedsidemon/settings_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ using namespace std::string_view_literals;

using namespace bedsidemon;

namespace m {
using namespace ruis::make;
} // namespace m

namespace {
constexpr const std::array<uint32_t, 3> sweep_speeds_um_per_sec = {
12500, //
Expand Down
10 changes: 4 additions & 6 deletions src/bedsidemon/spo2/spo2_parameter_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ using namespace ruis::length_literals;

using namespace bedsidemon;

namespace bedsidemon::m {
using namespace bedsidemon::make;
}; // namespace bedsidemon::m

namespace {
constexpr auto heart_blink_time_ms = 150;
} // namespace

namespace {
namespace m {
using namespace ruis::make;
using namespace bedsidemon::make;
}; // namespace m

using namespace ruis::length_literals;

constexpr auto color_main_value = 0xffffff00;
constexpr auto color_secondary_value = 0xff00ffff;
Expand Down
6 changes: 0 additions & 6 deletions src/bedsidemon/spo2/spo2_parameter_window_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ using namespace ruis::length_literals;

using namespace bedsidemon;

namespace {
namespace m {
using namespace ruis::make;
} // namespace m
} // namespace

namespace {
class selection_box_provider : public ruis::selection_box::provider
{
Expand Down
4 changes: 4 additions & 0 deletions src/bedsidemon/style.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ constexpr auto font_size_setting = ruis::length::make_pp(14);
constexpr auto gap_size_setting_label_value = ruis::length::make_pp(5);

} // namespace bedsidemon::style

namespace bedsidemon::m {
using namespace ruis::make;
} // namespace bedsidemon::m

0 comments on commit 2ed9c30

Please sign in to comment.