mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
editor: fix selection-color by style sheet
This commit is contained in:
parent
e3b9d060f3
commit
6777829a1d
@ -1,6 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
project_dir=$(pwd)
|
project_dir=$(pwd)
|
||||||
|
|
||||||
|
# Complain when not in Travis environment
|
||||||
|
if [ -z ${TRAVIS_COMMIT+x} ]; then
|
||||||
|
echo "This script is intended to be used only in Travis CI environment."
|
||||||
|
echo "To build VNote from source, please see the [documentation](https://tamlok.github.io/vnote/en_us/#!docs/Developers/Build%20VNote.md)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Install qt5.9
|
# Install qt5.9
|
||||||
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
|
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
|
||||||
sudo add-apt-repository ppa:beineri/opt-qt596-trusty -y
|
sudo add-apt-repository ppa:beineri/opt-qt596-trusty -y
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
project_dir=$(pwd)
|
project_dir=$(pwd)
|
||||||
|
|
||||||
|
# Complain when not in Travis environment
|
||||||
|
if [ -z ${TRAVIS_COMMIT+x} ]; then
|
||||||
|
echo "This script is intended to be used only in Travis CI environment."
|
||||||
|
echo "To build VNote from source, please see the [documentation](https://tamlok.github.io/vnote/en_us/#!docs/Developers/Build%20VNote.md)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
brew update > /dev/null
|
brew update > /dev/null
|
||||||
|
|
||||||
# Use Qt5.9.3 instead of 5.10
|
# Use Qt5.9.3 instead of 5.10
|
||||||
|
@ -4,7 +4,7 @@ body {
|
|||||||
color: #222222;
|
color: #222222;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background: #F5F5F5;
|
background: #EEEEEE;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -345,7 +345,7 @@ table.hljs-ln tr td.hljs-ln-code {
|
|||||||
|
|
||||||
::selection {
|
::selection {
|
||||||
background: #1976D2;
|
background: #1976D2;
|
||||||
color: #F5F5F5;
|
color: #EEEEEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-box {
|
.modal-box {
|
||||||
|
@ -14,12 +14,12 @@ editor
|
|||||||
font-family: Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, Microsoft YaHei UI, WenQuanYi Micro Hei, 文泉驿雅黑, Dengxian, 等线体, STXihei, 华文细黑, Liberation Sans, Droid Sans, NSimSun, 新宋体, SimSun, 宋体, Verdana, Helvetica, sans-serif, Tahoma, Arial, Geneva, Georgia, Times New Roman
|
font-family: Hiragino Sans GB, 冬青黑体, Microsoft YaHei, 微软雅黑, Microsoft YaHei UI, WenQuanYi Micro Hei, 文泉驿雅黑, Dengxian, 等线体, STXihei, 华文细黑, Liberation Sans, Droid Sans, NSimSun, 新宋体, SimSun, 宋体, Verdana, Helvetica, sans-serif, Tahoma, Arial, Geneva, Georgia, Times New Roman
|
||||||
font-size: 12
|
font-size: 12
|
||||||
foreground: 222222
|
foreground: 222222
|
||||||
background: f5f5f5
|
background: eeeeee
|
||||||
# [VNote] Style for trailing space
|
# [VNote] Style for trailing space
|
||||||
trailing-space: a8a8a8
|
trailing-space: a8a8a8
|
||||||
# [VNote] Style for line number
|
# [VNote] Style for line number
|
||||||
line-number-background: eaeaea
|
line-number-background: eeeeee
|
||||||
line-number-foreground: 424242
|
line-number-foreground: 666666
|
||||||
# [VNote] Style for selected word highlight
|
# [VNote] Style for selected word highlight
|
||||||
selected-word-foreground: 222222
|
selected-word-foreground: 222222
|
||||||
selected-word-background: dfdf00
|
selected-word-background: dfdf00
|
||||||
@ -39,7 +39,7 @@ color-column-foreground: ffff00
|
|||||||
preview-image-line-foreground: 9575cd
|
preview-image-line-foreground: 9575cd
|
||||||
|
|
||||||
editor-selection
|
editor-selection
|
||||||
foreground: f5f5f5
|
foreground: eeeeee
|
||||||
background: 1976d2
|
background: 1976d2
|
||||||
|
|
||||||
editor-current-line
|
editor-current-line
|
||||||
|
@ -7,7 +7,7 @@ mdhl_file=v_pure.mdhl
|
|||||||
css_file=v_pure.css
|
css_file=v_pure.css
|
||||||
codeblock_css_file=v_pure_codeblock.css
|
codeblock_css_file=v_pure_codeblock.css
|
||||||
mermaid_css_file=v_pure_mermaid.css
|
mermaid_css_file=v_pure_mermaid.css
|
||||||
version=25
|
version=26
|
||||||
|
|
||||||
[phony]
|
[phony]
|
||||||
; Abstract color attributes.
|
; Abstract color attributes.
|
||||||
@ -56,7 +56,7 @@ pressed_fg=@base_fg
|
|||||||
pressed_bg=#B2B2B2
|
pressed_bg=#B2B2B2
|
||||||
|
|
||||||
edit_fg=#222222
|
edit_fg=#222222
|
||||||
edit_bg=#F5F5F5
|
edit_bg=#EEEEEE
|
||||||
edit_focus_bg=#E0F2F1
|
edit_focus_bg=#E0F2F1
|
||||||
edit_focus_border=@master_bg
|
edit_focus_border=@master_bg
|
||||||
edit_hover_bg=#F2FAF9
|
edit_hover_bg=#F2FAF9
|
||||||
|
@ -1423,13 +1423,17 @@ void VMdEditor::setFontAndPaletteByStyleSheet(const QFont &p_font, const QPalett
|
|||||||
"font-family: \"%1\";"
|
"font-family: \"%1\";"
|
||||||
"font-size: %2pt;"
|
"font-size: %2pt;"
|
||||||
"color: %3;"
|
"color: %3;"
|
||||||
"background-color: %4; } "
|
"background-color: %4;"
|
||||||
|
"selection-color: %5;"
|
||||||
|
"selection-background-color: %6; } "
|
||||||
"VLineNumberArea {"
|
"VLineNumberArea {"
|
||||||
"font-size: %5pt; }")
|
"font-size: %7pt; }")
|
||||||
.arg(p_font.family())
|
.arg(p_font.family())
|
||||||
.arg(p_font.pointSize())
|
.arg(p_font.pointSize())
|
||||||
.arg(p_palette.color(QPalette::Text).name())
|
.arg(p_palette.color(QPalette::Text).name())
|
||||||
.arg(p_palette.color(QPalette::Base).name())
|
.arg(p_palette.color(QPalette::Base).name())
|
||||||
|
.arg(p_palette.color(QPalette::HighlightedText).name())
|
||||||
|
.arg(p_palette.color(QPalette::Highlight).name())
|
||||||
.arg(p_font.pointSize() + LINE_NUMBER_AREA_FONT_DELTA));
|
.arg(p_font.pointSize() + LINE_NUMBER_AREA_FONT_DELTA));
|
||||||
|
|
||||||
setStyleSheet(styles);
|
setStyleSheet(styles);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user