~aleteoryx/muditaos

ref: de5b923e81ed56bc845b75b2833cb040fafc3409 muditaos/module-apps/application-phonebook/data/PhonebookStyle.hpp -rw-r--r-- 7.3 KiB
de5b923e — DariuszSabala [BH-369] Turned UTF8 into separate 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once
#include <Style.hpp>
#include <utf8/UTF8.hpp>

namespace phonebookStyle
{
    namespace mainWindow
    {
        inline constexpr uint32_t default_x = style::window::default_left_margin;
        inline constexpr uint32_t default_w =
            style::window_width - style::window::default_left_margin - style::window::default_right_margin;
        namespace leftArrowImage
        {
            inline constexpr uint32_t x = default_x;
            inline constexpr uint32_t y = 62;
            inline constexpr uint32_t w = 11;
            inline constexpr uint32_t h = 13;
        } // namespace leftArrowImage
        namespace rightArrowImage
        {
            inline constexpr uint32_t x = style::window_width - style::window::default_left_margin - 11;
            inline constexpr uint32_t y = 62;
            inline constexpr uint32_t w = 11;
            inline constexpr uint32_t h = 13;
        } // namespace rightArrowImage
        namespace newContactImage
        {
            inline constexpr uint32_t x = style::window::default_left_margin + 20;
            inline constexpr uint32_t y = 55;
            inline constexpr uint32_t w = 24;
            inline constexpr uint32_t h = 24;
        } // namespace newContactImage
        namespace searchImage
        {
            inline constexpr uint32_t x =
                style::window_width - style::window::default_left_margin - rightArrowImage::w - 8 - 26;
            inline constexpr uint32_t y = 55;
            inline constexpr uint32_t w = 26;
            inline constexpr uint32_t h = 26;
        } // namespace searchImage
        namespace contactsList
        {
            inline constexpr uint32_t x = style::window::default_left_margin;
            inline constexpr uint32_t y = style::header::height;
            inline constexpr uint32_t w = style::listview::body_width_with_scroll;
            inline constexpr uint32_t h = style::window_height - y - style::footer::height;
        } // namespace contactsList
    }     // namespace mainWindow

    namespace newContactWindow
    {
        namespace newContactsList
        {
            inline constexpr uint32_t x = style::window::default_left_margin;
            inline constexpr uint32_t y = style::header::height;
            inline constexpr uint32_t w = style::listview::body_width_with_scroll;
            inline constexpr uint32_t h = style::window_height - y - style::footer::height;
        } // namespace newContactsList
    }     // namespace newContactWindow

    namespace contactDetailsWindow
    {
        namespace contactDetailsList
        {
            inline constexpr uint32_t x = style::window::default_left_margin;
            inline constexpr uint32_t y = style::header::height + 74;
            inline constexpr uint32_t w = style::listview::body_width_with_scroll;
            inline constexpr uint32_t h = style::window_height - y - style::footer::height;
        } // namespace contactDetailsList
        namespace contactDetailsListNoFlags
        {
            inline constexpr uint32_t x = style::window::default_left_margin;
            inline constexpr uint32_t y = style::header::height;
            inline constexpr uint32_t w = style::listview::body_width_with_scroll;
            inline constexpr uint32_t h = style::window_height - y - style::footer::height;
        } // namespace contactDetailsListNoFlags

    } // namespace contactDetailsWindow

    namespace searchResultsWindow
    {
        namespace searchResultList
        {
            inline constexpr uint32_t x = style::window::default_left_margin;
            inline constexpr uint32_t y = style::header::height;
            inline constexpr uint32_t w = style::listview::body_width_with_scroll;
            inline constexpr uint32_t h = style::window_height - y - style::footer::height;
        } // namespace searchResultList
    }     // namespace searchResultsWindow

    namespace iceContactsWindow
    {
        namespace contactsListIce
        {
            inline constexpr uint32_t x = style::window::default_left_margin;
            inline constexpr uint32_t y = style::header::height;
            inline constexpr uint32_t w = style::listview::body_width_with_scroll;
            inline constexpr uint32_t h = style::window_height - y - style::footer::height;
        } // namespace contactsListIce
    }     // namespace iceContactsWindow

    namespace contactItem
    {
        inline constexpr uint32_t w                    = style::window::default_body_width;
        inline constexpr uint32_t h                    = style::window::label::big_h;
        inline constexpr uint32_t blocked_right_margin = 5;
        inline constexpr auto favourites_string        = "Favourites";
    } // namespace contactItem

    namespace informationWidget
    {
        inline constexpr uint32_t w             = style::window::default_body_width;
        inline constexpr uint32_t title_label_h = 22;
        inline constexpr uint32_t email_text_h  = 35;
    } // namespace informationWidget

    namespace inputBoxWithLabelAndIconIWidget
    {
        inline constexpr uint32_t w = style::window::default_body_width;
        inline constexpr uint32_t h = 50;

        inline constexpr uint32_t input_box_w           = 55;
        inline constexpr uint32_t input_box_h           = h;
        inline constexpr int32_t input_box_right_margin = 20;

        inline constexpr uint32_t description_label_w           = 280;
        inline constexpr uint32_t description_label_h           = 33;
        inline constexpr int32_t description_label_right_margin = 40;

        inline constexpr int32_t tick_image_left_margin  = -64;
        inline constexpr int32_t tick_image_right_margin = 32;

    } // namespace inputBoxWithLabelAndIconIWidget

    namespace inputLinesWithLabelWidget
    {
        inline constexpr uint32_t w                = style::window::default_body_width;
        inline constexpr uint32_t h                = 63;
        inline constexpr uint32_t title_label_h    = 20;
        inline constexpr uint32_t input_text_h     = 37;
        inline constexpr uint32_t span_size        = 6;
        inline constexpr int32_t underline_padding = 4;
    } // namespace inputLinesWithLabelWidget

    namespace outputLinesTextWithLabelWidget
    {
        inline constexpr uint32_t w             = style::window::default_body_width;
        inline constexpr uint32_t h             = 75;
        inline constexpr uint32_t title_label_h = 22;
        inline constexpr uint32_t input_text_h  = 33;
        inline constexpr uint32_t span_size     = style::margins::huge;
    } // namespace outputLinesTextWithLabelWidget

    namespace numbersWithIconsWidget
    {
        inline constexpr uint32_t h                        = 55;
        inline constexpr uint32_t sms_image_w              = 55;
        inline constexpr uint32_t sms_image_h              = h;
        inline constexpr uint32_t phone_image_w            = 55;
        inline constexpr uint32_t phone_image_h            = h;
        inline constexpr uint32_t phone_image_margin_left  = 30;
        inline constexpr uint32_t phone_image_margin_right = 15;
        inline constexpr uint32_t number_text_h            = h;
    } // namespace numbersWithIconsWidget

} // namespace phonebookStyle