Browse Source

themes: refine

Le Tan 8 years ago
parent
commit
6808fac920

+ 4 - 0
src/resources/themes/v_pure/v_pure.qss

@@ -679,6 +679,10 @@ QLineEdit[VimCommandLine="true"] {
     color: @lineedit_fg;
     background: @lineedit_bg;
 }
+
+QLineEdit[VimCommandLine="true"]:focus {
+    background: @lineedit_focus_bg;
+}
 /* End QLineEdit */
 
 /* QPlainTextEdit QTextEdit */

+ 60 - 57
src/resources/themes/v_pure/v_pure_codeblock.css

@@ -1,20 +1,6 @@
 /*
 
-Atom One Light by Daniel Gamage
-Original One Light Syntax theme from https://github.com/atom/one-light-syntax
-
-base:    #fafafa
-mono-1:  #383a42
-mono-2:  #686b77
-mono-3:  #a0a1a7
-hue-1:   #0184bb
-hue-2:   #4078f2
-hue-3:   #a626a4
-hue-4:   #50a14f
-hue-5:   #e45649
-hue-5-2: #c91243
-hue-6:   #986801
-hue-6-2: #c18401
+Original highlight.js style (c) Ivan Sagalaev <[email protected]>
 
 */
 
@@ -22,67 +8,88 @@ hue-6-2: #c18401
   display: block;
   overflow-x: auto;
   padding: 0.5em;
-  color: #383a42;
-  background: #fafafa;
+  background: #E0E0E0;
 }
 
-.hljs-comment,
-.hljs-quote {
-  color: #a0a1a7;
-  font-style: italic;
+
+/* Base color: saturation 0; */
+
+.hljs,
+.hljs-subst {
+  color: #363636;
 }
 
-.hljs-doctag,
-.hljs-keyword,
-.hljs-formula {
-  color: #a626a4;
+.hljs-comment {
+  color: #767676;
 }
 
-.hljs-section,
-.hljs-name,
+.hljs-keyword,
+.hljs-attribute,
 .hljs-selector-tag,
-.hljs-deletion,
-.hljs-subst {
-  color: #e45649;
+.hljs-meta-keyword,
+.hljs-doctag,
+.hljs-name {
+  color: #0000ee;
 }
 
-.hljs-literal {
-  color: #0184bb;
-}
 
+/* User color: hue: 0 */
+
+.hljs-type,
 .hljs-string,
-.hljs-regexp,
-.hljs-addition,
-.hljs-attribute,
-.hljs-meta-string {
-  color: #50a14f;
+.hljs-number,
+.hljs-selector-id,
+.hljs-selector-class,
+.hljs-quote,
+.hljs-template-tag,
+.hljs-deletion {
+  color: #880000;
 }
 
-.hljs-built_in,
-.hljs-class .hljs-title {
-  color: #c18401;
+.hljs-title,
+.hljs-section {
+  color: #880000;
+  font-weight: bold;
 }
 
-.hljs-attr,
+.hljs-regexp,
+.hljs-symbol,
 .hljs-variable,
 .hljs-template-variable,
-.hljs-type,
-.hljs-selector-class,
+.hljs-link,
 .hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-number {
-  color: #986801;
+.hljs-selector-pseudo {
+  color: #BC6060;
 }
 
-.hljs-symbol,
+
+/* Language color: hue: 90; */
+
+.hljs-literal {
+  color: #af00d7;
+}
+
+.hljs-built_in,
 .hljs-bullet,
-.hljs-link,
-.hljs-meta,
-.hljs-selector-id,
-.hljs-title {
-  color: #4078f2;
+.hljs-code,
+.hljs-addition {
+  color: #008700;
 }
 
+
+/* Meta color: hue: 200 */
+
+.hljs-meta {
+  color: #1f7199;
+}
+
+.hljs-meta-string {
+  color: #4d99bf;
+}
+
+
+/* Misc effects */
+
 .hljs-emphasis {
   font-style: italic;
 }
@@ -90,7 +97,3 @@ hue-6-2: #c18401
 .hljs-strong {
   font-weight: bold;
 }
-
-.hljs-link {
-  text-decoration: underline;
-}

+ 1 - 1
src/resources/themes/v_white/v_white_codeblock.css

@@ -8,7 +8,7 @@ Original highlight.js style (c) Ivan Sagalaev <[email protected]>
   display: block;
   overflow-x: auto;
   padding: 0.5em;
-  background: #F0F0F0;
+  background: #E0E0E0;
 }
 
 

+ 1 - 0
src/vmdeditor.cpp

@@ -116,6 +116,7 @@ void VMdEditor::beginEdit()
 
     if (m_freshEdit) {
         m_mdHighlighter->updateHighlight();
+        relayout();
     } else {
         updateHeaders(m_mdHighlighter->getHeaderRegions());
     }

+ 5 - 0
src/vtextedit.cpp

@@ -383,3 +383,8 @@ void VTextEdit::setCursorLineBlockBg(const QColor &p_bg)
 {
     getLayout()->setCursorLineBlockBg(p_bg);
 }
+
+void VTextEdit::relayout()
+{
+    getLayout()->relayout();
+}

+ 2 - 1
src/vtextedit.h

@@ -63,6 +63,8 @@ public:
 
     void setCursorLineBlockBg(const QColor &p_bg);
 
+    void relayout();
+
 protected:
     void resizeEvent(QResizeEvent *p_event) Q_DECL_OVERRIDE;
 
@@ -108,5 +110,4 @@ inline void VTextEdit::setLineNumberColor(const QColor &p_foreground,
     m_lineNumberArea->setForegroundColor(p_foreground);
     m_lineNumberArea->setBackgroundColor(p_background);
 }
-
 #endif // VTEXTEDIT_H