~aleteoryx/muditaos

ref: 053c06d7a9a9efb8364dc3917de77fe56c061fbc muditaos/module-apps/application-meditation/data/Style.hpp -rw-r--r-- 4.1 KiB
053c06d7 — DariuszSabala [BH-390] Turned notes app into library 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

namespace style::meditation
{
    constexpr auto VerticalWidgetGap = 20;
    namespace body
    {
        constexpr auto Width  = style::window_width;
        constexpr auto Height = style::window_height - style::window::default_vertical_pos - style::footer::height - 1;
        constexpr auto X      = 1;
        constexpr auto Y      = style::window::default_vertical_pos;
    } // namespace body

    namespace timer
    {
        constexpr auto Radius = 150;
        constexpr auto X      = body::X + (body::Width / 2) - Radius;
        constexpr auto Y      = body::Y + 20;
        constexpr auto Width  = 2 * Radius;
        constexpr auto Height = Width;

        constexpr auto BorderColor = gui::ColorGrey;
        constexpr auto BorderColorOnFocused = gui::ColorFullBlack;
        constexpr auto PenWidth    = 3;

        namespace setterValueLabel
        {
            constexpr auto X      = 100;
            constexpr auto Y      = 100;
            constexpr auto Width  = timer::Width - 2 * X;
            constexpr auto Height = timer::Height - 2 * Y;
        } // namespace setterValueLabel

        namespace setterUnitLabel
        {
            constexpr auto X      = 0;
            constexpr auto Y      = setterValueLabel::Y + setterValueLabel::Height;
            constexpr auto Width  = timer::Width;
            constexpr auto Height = 40;
        } // namespace setterUnitLabel

        namespace infoText
        {
            constexpr auto X      = style::window::default_left_margin;
            constexpr auto Y      = 0;
            constexpr auto Width  = style::window::default_body_width;
            constexpr auto Height = style::window_height;
        } // namespace infoText

    } // namespace timer

    namespace intervalBox
    {
        constexpr auto X      = style::window::default_left_margin;
        constexpr auto Y      = style::meditation::timer::Y + style::meditation::timer::Height + VerticalWidgetGap;
        constexpr auto Width  = style::window::default_body_width;
        constexpr auto Height = 60;

        namespace topLabel
        {
            constexpr auto X      = 0;
            constexpr auto Y      = 0;
            constexpr auto Width  = intervalBox::Width;
            constexpr auto Height = intervalBox::Height / 2;
        } // namespace topLabel

        namespace bottomLabel
        {
            constexpr auto X      = 0;
            constexpr auto Y      = topLabel::Y + topLabel::Height;
            constexpr auto Width  = intervalBox::Width;
            constexpr auto Height = intervalBox::Height / 2;
        } // namespace bottomLabel

        namespace arrow
        {
            constexpr auto Y      = 10;
            constexpr auto Width  = 15;
            constexpr auto Height = intervalBox::Height / 2;
            constexpr auto LeftX  = 0;
            constexpr auto RightX = intervalBox::Width - arrow::Width;
        } // namespace arrow

    } // namespace intervalBox

    namespace itemList
    {
        namespace text
        {
            constexpr auto X      = 10;
            constexpr auto Y      = 0;
            constexpr auto Width  = style::window::default_body_width;
            constexpr auto Height = style::window::label::big_h;
        } // namespace text

        namespace image
        {
            constexpr auto X      = style::window::default_body_width - 50;
            constexpr auto Y      = 12;
            constexpr auto OnOffY = 15;
            constexpr auto Width  = 0;
            constexpr auto Height = 0;
        } // namespace image

    } // namespace itemList

    namespace listView
    {
        namespace window
        {
            constexpr auto X      = style::window::default_left_margin;
            constexpr auto Y      = style::window::default_vertical_pos;
            constexpr auto Width  = style::listview::body_width_with_scroll;
            constexpr auto Height = style::window_height - Y - style::footer::height;
        } // namespace window

    } // namespace listView

} // namespace style::meditation