2017-07-15 16:11:46 +02:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-24 12:13:07 +01:00
|
|
|
#include <QRegExp>
|
|
|
|
#include <QString>
|
|
|
|
|
2017-07-15 16:11:46 +02:00
|
|
|
// Non-theme app configuration. Layouts, fonts spacing etc.
|
|
|
|
//
|
|
|
|
// Font sizes are in pixels.
|
|
|
|
|
2017-10-15 21:08:51 +02:00
|
|
|
namespace conf {
|
2017-07-15 16:11:46 +02:00
|
|
|
// Global settings.
|
2017-12-21 13:04:36 +01:00
|
|
|
static constexpr int fontSize = 14;
|
2017-10-15 21:08:51 +02:00
|
|
|
static constexpr int textInputFontSize = 14;
|
|
|
|
static constexpr int emojiSize = 14;
|
|
|
|
static constexpr int headerFontSize = 21;
|
|
|
|
static constexpr int typingNotificationFontSize = 11;
|
2017-07-15 16:11:46 +02:00
|
|
|
|
2018-01-03 17:05:49 +01:00
|
|
|
namespace receipts {
|
|
|
|
static constexpr int font = 12;
|
|
|
|
}
|
|
|
|
|
2017-12-21 13:36:05 +01:00
|
|
|
namespace dialogs {
|
|
|
|
static constexpr int labelSize = 15;
|
|
|
|
}
|
|
|
|
|
2017-12-24 12:13:07 +01: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 12:59:28 +02:00
|
|
|
// Window geometry.
|
2017-10-15 21:08:51 +02:00
|
|
|
namespace window {
|
|
|
|
static constexpr int height = 600;
|
|
|
|
static constexpr int width = 1066;
|
2017-07-30 12:59:28 +02:00
|
|
|
|
2017-10-15 21:08:51 +02:00
|
|
|
static constexpr int minHeight = height;
|
|
|
|
static constexpr int minWidth = 950;
|
|
|
|
} // namespace window
|
|
|
|
|
|
|
|
namespace textInput {
|
|
|
|
static constexpr int height = 50;
|
2017-07-30 12:59:28 +02:00
|
|
|
}
|
|
|
|
|
2017-10-15 21:08:51 +02:00
|
|
|
namespace sidebarActions {
|
|
|
|
static constexpr int height = textInput::height;
|
|
|
|
static constexpr int iconSize = 28;
|
2017-07-15 16:11:46 +02:00
|
|
|
}
|
|
|
|
|
2017-10-15 21:08:51 +02:00
|
|
|
// Button settings.
|
|
|
|
namespace btn {
|
|
|
|
static constexpr int fontSize = 20;
|
|
|
|
static constexpr int cornerRadius = 3;
|
|
|
|
} // namespace btn
|
|
|
|
|
2017-07-15 16:11:46 +02:00
|
|
|
// RoomList specific.
|
2017-10-15 21:08:51 +02:00
|
|
|
namespace roomlist {
|
|
|
|
namespace fonts {
|
2018-03-20 20:23:01 +01:00
|
|
|
static constexpr int heading = 13;
|
|
|
|
static constexpr int timestamp = heading;
|
2018-03-22 15:34:11 +01:00
|
|
|
static constexpr int badge = 10;
|
2018-03-18 14:54:53 +01:00
|
|
|
static constexpr int bubble = 20;
|
2017-08-20 12:47:22 +02:00
|
|
|
} // namespace fonts
|
|
|
|
} // namespace roomlist
|
2017-07-15 16:11:46 +02:00
|
|
|
|
2017-10-15 21:08:51 +02:00
|
|
|
namespace userInfoWidget {
|
|
|
|
namespace fonts {
|
|
|
|
static constexpr int displayName = 16;
|
|
|
|
static constexpr int userid = 14;
|
2017-08-20 12:47:22 +02:00
|
|
|
} // namespace fonts
|
|
|
|
} // namespace userInfoWidget
|
2017-07-15 16:11:46 +02:00
|
|
|
|
2017-10-15 21:08:51 +02:00
|
|
|
namespace topRoomBar {
|
|
|
|
namespace fonts {
|
|
|
|
static constexpr int roomName = 15;
|
2017-12-21 13:04:36 +01:00
|
|
|
static constexpr int roomDescription = 14;
|
2017-08-20 12:47:22 +02:00
|
|
|
} // namespace fonts
|
|
|
|
} // namespace topRoomBar
|
2017-07-15 16:11:46 +02:00
|
|
|
|
2017-10-15 21:08:51 +02:00
|
|
|
namespace timeline {
|
2017-12-21 13:04:36 +01:00
|
|
|
static constexpr int msgMargin = 14;
|
2017-10-15 21:08:51 +02:00
|
|
|
static constexpr int avatarSize = 36;
|
2017-12-21 13:04:36 +01:00
|
|
|
static constexpr int headerSpacing = 7;
|
2017-10-15 21:08:51 +02:00
|
|
|
static constexpr int headerLeftMargin = 15;
|
2017-07-15 16:11:46 +02:00
|
|
|
|
2017-10-15 21:08:51 +02:00
|
|
|
namespace fonts {
|
2018-01-14 11:29:54 +01:00
|
|
|
static constexpr int timestamp = 13;
|
2018-03-18 14:54:53 +01:00
|
|
|
static constexpr int dateSeparator = conf::fontSize;
|
2017-10-15 21:08:51 +02:00
|
|
|
} // namespace fonts
|
|
|
|
} // namespace timeline
|
2017-07-15 16:11:46 +02:00
|
|
|
|
2017-08-20 12:47:22 +02:00
|
|
|
} // namespace conf
|