TexWorks 設定黑色背景 
Tuesday, October 1, 2019, 07:59 PM - 工作日誌   (同類別文章列表)
Posted by Administrator
需先建立一個css檔,例如「DarkMode.css」,其內容如附:

QWidget { /* everything, basically */
background-color: #3A3A3A;
color: white;
}

QPushButton { /* buttons */
background-color: #646464;
border-style: inset;
border-width: 1.5pt;
border-color: white;
padding: 4px;
}

QPushButton:pressed { /* after you press the button */
background-color: #818181;
}

QTableView {
background-color: #424242;
alternate-background-color: #424242;
selection-background-color: #818181;
font-color:#FFFFFF;
}

/* QComboBox refers to drop-down menus (such as when selecting pdfTeX, pdfLaTeX, XeTeX, etc.) */

QComboBox {
border: 1px solid gray;
padding: 1px 18px 1px 3px;
border-radius: 4px;
}

QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 15px;
border-left-width: 1px;
border-left-color: #EEEEEE;
border-left-style: solid; /* just a single line */
}

QComboBox::down-arrow:on {
top: 5px;
left: 5px;
}

/* QMenuBar refers to the menu at the top (File, Edit, etc.)
QMenu::item refers to the items under the menu
*/

QMenu::item:selected { /* when user selects item using mouse or keyboard */
background-color: #909090;
}

QMenuBar::item:pressed, QMenuBar::item:selected {
background: #909090;
}

QTextEdit { /* text editor */
background-color: black;
color: white;
}

QScrollBar:vertical { /* vertical scroll bar */
background: #424242;
width: 10px;
margin: 10px 0 10px 0;
}
QScrollBar::handle:vertical { /* the part of the scroll bar that gets dragged*/
background: #AAAAAA;
min-height: 20px;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
/* this seems useless, but it is actually quite important-
it makes the scroll bar's background a uniform color instead
of tiny dots, if it were removed. */
background: none;
}

QScrollBar:horizontal { /* same thing, but horizontal */
background: #424242;
height: 10px;
margin: 0 10px 0 10px;
}
QScrollBar::handle:horizontal { /* etc. */
background: #AAAAAA;
min-width: 20px;
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
background: none;
}

QTabBar::tab { /* tabs that lead to different displays (such as those under "Preferences") */
background: #3A3A3A;
border: #909090;
padding: 2px 4px 6px 8px;
/* now I can't remember how this padding works, but removing it leads to ugly tab designs*/
}

QTabBar::tab:hover {
background: #818181;
}

QTabBar::tab:selected {
background: #909090;
}


之後使用regedit編輯TexWorks被呼叫時的參數,可參考下列reg檔內容:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MiKTeX.tex.2.9\shell\open\command]
@="\"C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\miktex-texworks.exe\" -stylesheet C:\\Users\\Tsengkt\\Documents\\DarkBackGroundforTexWork.css \"%1\""


記得要因版本不同或路徑不同相對應的更動…
發表回應 ( 共計574閱讀人次 )   |  permalink   |  $star_image$star_image$star_image$star_image$star_image ( 3 / 465 )

<<第一頁 <前一頁 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 下一頁> 最後>>