matrixion/include/Config.h

105 lines
2.3 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.
constexpr int fontSize = 14;
constexpr int textInputFontSize = 14;
constexpr int emojiSize = 14;
constexpr int headerFontSize = 21;
constexpr int typingNotificationFontSize = 11;
namespace popup {
constexpr int font = fontSize;
constexpr int avatar = 28;
}
namespace modals {
constexpr int errorFont = conf::fontSize - 2;
}
2018-01-03 19:05:49 +03:00
namespace receipts {
constexpr int font = 12;
2018-01-03 19:05:49 +03:00
}
2017-12-21 15:36:05 +03:00
namespace dialogs {
constexpr int labelSize = 15;
2017-12-21 15:36:05 +03:00
}
2017-12-24 14:13:07 +03:00
namespace strings {
const QString url_html = "<a href=\"\\1\">\\1</a>";
const QRegExp url_regex(
2017-12-24 14:13:07 +03:00
"((www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]\\)\\:])");
}
// Window geometry.
2017-10-15 22:08:51 +03:00
namespace window {
constexpr int height = 600;
constexpr int width = 1066;
constexpr int minHeight = height;
constexpr int minWidth = 950;
2017-10-15 22:08:51 +03:00
} // namespace window
namespace textInput {
constexpr int height = 50;
}
2017-10-15 22:08:51 +03:00
namespace sidebarActions {
constexpr int height = textInput::height;
constexpr int iconSize = 28;
}
2017-10-15 22:08:51 +03:00
// Button settings.
namespace btn {
constexpr int fontSize = 20;
constexpr int cornerRadius = 3;
2017-10-15 22:08:51 +03:00
} // namespace btn
// RoomList specific.
2017-10-15 22:08:51 +03:00
namespace roomlist {
namespace fonts {
constexpr int heading = 13;
constexpr int timestamp = heading;
constexpr int badge = 10;
constexpr int bubble = 20;
constexpr int communityBubble = bubble - 4;
2017-08-20 13:47:22 +03:00
} // namespace fonts
} // namespace roomlist
2017-10-15 22:08:51 +03:00
namespace userInfoWidget {
namespace fonts {
2018-05-25 16:13:38 +03:00
constexpr int displayName = 15;
constexpr int userid = 13;
2017-08-20 13:47:22 +03:00
} // namespace fonts
} // namespace userInfoWidget
2017-10-15 22:08:51 +03:00
namespace topRoomBar {
namespace fonts {
constexpr int roomName = 15;
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 {
constexpr int msgAvatarTopMargin = 15;
constexpr int msgTopMargin = 2;
constexpr int msgLeftMargin = 14;
constexpr int avatarSize = 36;
constexpr int headerSpacing = 3;
constexpr int headerLeftMargin = 15;
2017-10-15 22:08:51 +03:00
namespace fonts {
constexpr int timestamp = 13;
constexpr int dateSeparator = conf::fontSize;
2017-10-15 22:08:51 +03:00
} // namespace fonts
} // namespace timeline
2017-08-20 13:47:22 +03:00
} // namespace conf