2017-07-15 17:11:46 +03:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-24 14:13:07 +03:00
|
|
|
#include <QRegExp>
|
|
|
|
#include <QString>
|
|
|
|
|
2017-07-15 17:11:46 +03:00
|
|
|
// Non-theme app configuration. Layouts, fonts spacing etc.
|
|
|
|
//
|
|
|
|
// Font sizes are in pixels.
|
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
namespace conf {
|
2017-07-15 17:11:46 +03:00
|
|
|
// Global settings.
|
2017-12-21 15:04:36 +03:00
|
|
|
static constexpr int fontSize = 14;
|
2017-10-15 22:08:51 +03:00
|
|
|
static constexpr int textInputFontSize = 14;
|
|
|
|
static constexpr int emojiSize = 14;
|
|
|
|
static constexpr int headerFontSize = 21;
|
|
|
|
static constexpr int typingNotificationFontSize = 11;
|
2017-07-15 17:11:46 +03:00
|
|
|
|
2017-12-21 15:36:05 +03:00
|
|
|
namespace dialogs {
|
|
|
|
static constexpr int labelSize = 15;
|
|
|
|
}
|
|
|
|
|
2017-12-24 14:13:07 +03:00
|
|
|
namespace strings {
|
|
|
|
static const QString url_html = "<a href=\"\\1\">\\1</a>";
|
|
|
|
static const QRegExp url_regex(
|
|
|
|
"((www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]\\)\\:])");
|
|
|
|
}
|
|
|
|
|
2017-07-30 13:59:28 +03:00
|
|
|
// Window geometry.
|
2017-10-15 22:08:51 +03:00
|
|
|
namespace window {
|
|
|
|
static constexpr int height = 600;
|
|
|
|
static constexpr int width = 1066;
|
2017-07-30 13:59:28 +03:00
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
static constexpr int minHeight = height;
|
|
|
|
static constexpr int minWidth = 950;
|
|
|
|
} // namespace window
|
|
|
|
|
|
|
|
namespace textInput {
|
|
|
|
static constexpr int height = 50;
|
2017-07-30 13:59:28 +03:00
|
|
|
}
|
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
namespace sidebarActions {
|
|
|
|
static constexpr int height = textInput::height;
|
|
|
|
static constexpr int iconSize = 28;
|
2017-07-15 17:11:46 +03:00
|
|
|
}
|
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
// Button settings.
|
|
|
|
namespace btn {
|
|
|
|
static constexpr int fontSize = 20;
|
|
|
|
static constexpr int cornerRadius = 3;
|
|
|
|
} // namespace btn
|
|
|
|
|
2017-07-15 17:11:46 +03:00
|
|
|
// RoomList specific.
|
2017-10-15 22:08:51 +03:00
|
|
|
namespace roomlist {
|
|
|
|
namespace fonts {
|
2017-12-21 15:36:05 +03:00
|
|
|
static constexpr int heading = 14;
|
2017-10-15 22:08:51 +03:00
|
|
|
static constexpr int badge = 10;
|
|
|
|
static constexpr int bubble = 20;
|
2017-08-20 13:47:22 +03:00
|
|
|
} // namespace fonts
|
|
|
|
} // namespace roomlist
|
2017-07-15 17:11:46 +03:00
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
namespace userInfoWidget {
|
|
|
|
namespace fonts {
|
|
|
|
static constexpr int displayName = 16;
|
|
|
|
static constexpr int userid = 14;
|
2017-08-20 13:47:22 +03:00
|
|
|
} // namespace fonts
|
|
|
|
} // namespace userInfoWidget
|
2017-07-15 17:11:46 +03:00
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
namespace topRoomBar {
|
|
|
|
namespace fonts {
|
|
|
|
static constexpr int roomName = 15;
|
2017-12-21 15:04:36 +03:00
|
|
|
static constexpr int roomDescription = 14;
|
2017-08-20 13:47:22 +03:00
|
|
|
} // namespace fonts
|
|
|
|
} // namespace topRoomBar
|
2017-07-15 17:11:46 +03:00
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
namespace timeline {
|
2017-12-21 15:04:36 +03:00
|
|
|
static constexpr int msgMargin = 14;
|
2017-10-15 22:08:51 +03:00
|
|
|
static constexpr int avatarSize = 36;
|
2017-12-21 15:04:36 +03:00
|
|
|
static constexpr int headerSpacing = 7;
|
2017-10-15 22:08:51 +03:00
|
|
|
static constexpr int headerLeftMargin = 15;
|
2017-07-15 17:11:46 +03:00
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
namespace fonts {
|
2017-12-26 00:02:33 +03:00
|
|
|
static constexpr int timestamp = 10;
|
|
|
|
static constexpr int dateSeparator = conf::fontSize - 2;
|
2017-10-15 22:08:51 +03:00
|
|
|
} // namespace fonts
|
|
|
|
} // namespace timeline
|
2017-07-15 17:11:46 +03:00
|
|
|
|
2017-08-20 13:47:22 +03:00
|
|
|
} // namespace conf
|