matrixion/include/Config.h

88 lines
2.1 KiB
C
Raw Permalink Normal View History

#pragma once
2017-12-24 14:13:07 +03:00
#include <QRegExp>
#include <QString>
// Non-theme app configuration. Layouts, fonts spacing etc.
//
// Font sizes are in pixels.
2017-10-15 22:08:51 +03:00
namespace conf {
// 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-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<>'\"\\]\\)\\:])");
}
// Window geometry.
2017-10-15 22:08:51 +03:00
namespace window {
static constexpr int height = 600;
static constexpr int width = 1066;
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-10-15 22:08:51 +03:00
namespace sidebarActions {
static constexpr int height = textInput::height;
static constexpr int iconSize = 28;
}
2017-10-15 22:08:51 +03:00
// Button settings.
namespace btn {
static constexpr int fontSize = 20;
static constexpr int cornerRadius = 3;
} // namespace btn
// 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-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-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-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-10-15 22:08:51 +03:00
namespace fonts {
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-08-20 13:47:22 +03:00
} // namespace conf