mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
change default style and config tool bar icon size by tool_bar_icon_size
This commit is contained in:
parent
a36b512e94
commit
7a384b1592
@ -1,13 +1,13 @@
|
||||
body {
|
||||
margin: 0 auto;
|
||||
font-family: Helvetica, sans-serif, Tahoma, Arial, Verdana, Geneva, Georgia, Palatino, "Times New Roman", "Hiragino Sans GB", "冬青黑体", "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "WenQuanYi Micro Hei", "文泉驿雅黑", Dengxian, "等线体", STXihei, "华文细黑", "Liberation Sans", "Droid Sans", NSimSun, "新宋体", SimSun, "宋体";
|
||||
color: #444444;
|
||||
color: #363636;
|
||||
line-height: 1;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #222222;
|
||||
color: #363636;
|
||||
font-weight: bold;
|
||||
margin-bottom: 24px;
|
||||
padding: 0;
|
||||
@ -97,7 +97,7 @@ pre code {
|
||||
border: none;
|
||||
background: transparent;
|
||||
overflow: auto;
|
||||
color: #444444;
|
||||
color: #363636;
|
||||
}
|
||||
|
||||
aside {
|
||||
|
@ -13,6 +13,7 @@ editor
|
||||
# Do not use "" to quote the name
|
||||
font-family: Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, Microsoft YaHei UI, WenQuanYi Micro Hei, 文泉驿雅黑, Dengxian, 等线体, STXihei, 华文细黑, Liberation Sans, Droid Sans, NSimSun, 新宋体, SimSun, 宋体, Helvetica, sans-serif, Tahoma, Arial, Verdana, Geneva, Georgia, Times New Roman
|
||||
font-size: 12
|
||||
foreground: 363636
|
||||
# [VNote] Style for trailing space
|
||||
trailing-space: a8a8a8
|
||||
# [VNote] Style for line number
|
||||
@ -46,32 +47,32 @@ vim-visual-background: 90caf9
|
||||
vim-replace-background: f8bbd0
|
||||
|
||||
H1
|
||||
foreground: 111111
|
||||
foreground: 363636
|
||||
font-style: bold
|
||||
font-size: +8
|
||||
|
||||
H2
|
||||
foreground: 111111
|
||||
foreground: 363636
|
||||
font-style: bold
|
||||
font-size: +6
|
||||
|
||||
H3
|
||||
foreground: 111111
|
||||
foreground: 363636
|
||||
font-style: bold
|
||||
font-size: +4
|
||||
|
||||
H4
|
||||
foreground: 111111
|
||||
foreground: 363636
|
||||
font-style: bold
|
||||
font-size: +2
|
||||
|
||||
H5
|
||||
foreground: 111111
|
||||
foreground: 363636
|
||||
font-style: bold
|
||||
font-size: +2
|
||||
|
||||
H6
|
||||
foreground: 111111
|
||||
foreground: 363636
|
||||
font-style: bold
|
||||
font-size: +2
|
||||
|
||||
|
@ -93,6 +93,9 @@ color_column=0
|
||||
; Whether display line number of code block in read mode
|
||||
enable_code_block_line_number=false
|
||||
|
||||
; The icon size of tool bar (in pixels)
|
||||
tool_bar_icon_size=18
|
||||
|
||||
[session]
|
||||
tools_dock_checked=true
|
||||
|
||||
|
@ -182,6 +182,9 @@ void VConfigManager::initialize()
|
||||
|
||||
m_enableCodeBlockLineNumber = getConfigFromSettings("global",
|
||||
"enable_code_block_line_number").toBool();
|
||||
|
||||
m_toolBarIconSize = getConfigFromSettings("global",
|
||||
"tool_bar_icon_size").toInt();
|
||||
}
|
||||
|
||||
void VConfigManager::readPredefinedColorsFromSettings()
|
||||
|
@ -244,6 +244,8 @@ public:
|
||||
bool getEnableCodeBlockLineNumber() const;
|
||||
void setEnableCodeBlockLineNumber(bool p_enabled);
|
||||
|
||||
int getToolBarIconSize() const;
|
||||
|
||||
// Return the configured key sequence of @p_operation.
|
||||
// Return empty if there is no corresponding config.
|
||||
QString getShortcutKeySequence(const QString &p_operation) const;
|
||||
@ -496,6 +498,9 @@ private:
|
||||
// The foreground color of the color column.
|
||||
QString m_editorColorColumnFg;
|
||||
|
||||
// Icon size of tool bar in pixels.
|
||||
int m_toolBarIconSize;
|
||||
|
||||
// The name of the config file in each directory, obsolete.
|
||||
// Use c_dirConfigFile instead.
|
||||
static const QString c_obsoleteDirConfigFile;
|
||||
@ -1289,4 +1294,9 @@ inline void VConfigManager::setEnableCodeBlockLineNumber(bool p_enabled)
|
||||
m_enableCodeBlockLineNumber);
|
||||
}
|
||||
|
||||
inline int VConfigManager::getToolBarIconSize() const
|
||||
{
|
||||
return m_toolBarIconSize;
|
||||
}
|
||||
|
||||
#endif // VCONFIGMANAGER_H
|
||||
|
@ -196,7 +196,7 @@ QWidget *VMainWindow::setupDirectoryPanel()
|
||||
|
||||
void VMainWindow::initToolBar()
|
||||
{
|
||||
const int tbIconSize = 20 * VUtils::calculateScaleFactor();
|
||||
const int tbIconSize = g_config->getToolBarIconSize() * VUtils::calculateScaleFactor();
|
||||
QSize iconSize(tbIconSize, tbIconSize);
|
||||
|
||||
initFileToolBar(iconSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user