Night_mode.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <!DOCTYPE html>
  2. <html dir="ltr">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  5. <title>App/UI/Night mode - XOWA</title>
  6. <link rel="shortcut icon" href="https://gnosygnu.github.io/xowa/xowa_logo.png" />
  7. <link rel="stylesheet" href="https://gnosygnu.github.io/xowa/xowa_common.css" type="text/css">
  8. </head>
  9. <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject skin-vector action-submit vector-animateLayout" spellcheck="false">
  10. <div id="mw-page-base" class="noprint"></div>
  11. <div id="mw-head-base" class="noprint"></div>
  12. <div id="content" class="mw-body">
  13. <h1 id="firstHeading" class="firstHeading"><span>App/UI/Night mode</span></h1>
  14. <div id="bodyContent" class="mw-body-content">
  15. <div id="siteSub">From XOWA: the free, open-source, offline wiki application</div>
  16. <div id="contentSub"></div>
  17. <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
  18. <p>
  19. As of v4.4, XOWA offers night mode.
  20. </p>
  21. <div id="toc" class="toc">
  22. <div id="toctitle" class="toctitle">
  23. <h2>
  24. Contents
  25. </h2>
  26. </div>
  27. <ul>
  28. <li class="toclevel-1 tocsection-1">
  29. <a href="#Enabling"><span class="tocnumber">1</span> <span class="toctext">Enabling</span></a>
  30. </li>
  31. <li class="toclevel-1 tocsection-2">
  32. <a href="#Color_control"><span class="tocnumber">2</span> <span class="toctext">Color control</span></a>
  33. <ul>
  34. <li class="toclevel-2 tocsection-3">
  35. <a href="#Operating_System"><span class="tocnumber">2.1</span> <span class="toctext">Operating System</span></a>
  36. </li>
  37. <li class="toclevel-2 tocsection-4">
  38. <a href="#SWT"><span class="tocnumber">2.2</span> <span class="toctext">SWT</span></a>
  39. </li>
  40. <li class="toclevel-2 tocsection-5">
  41. <a href="#CSS"><span class="tocnumber">2.3</span> <span class="toctext">CSS</span></a>
  42. </li>
  43. <li class="toclevel-2 tocsection-6">
  44. <a href="#Generating_a_night-mode_CSS_from_scratch"><span class="tocnumber">2.4</span> <span class="toctext">Generating a night-mode CSS from scratch</span></a>
  45. </li>
  46. <li class="toclevel-2 tocsection-7">
  47. <a href="#Specifying_a_night-mode_CSS_per_wiki"><span class="tocnumber">2.5</span> <span class="toctext">Specifying a night-mode CSS per wiki</span></a>
  48. </li>
  49. </ul>
  50. </li>
  51. <li class="toclevel-1 tocsection-8">
  52. <a href="#Known_issues"><span class="tocnumber">3</span> <span class="toctext">Known issues</span></a>
  53. <ul>
  54. <li class="toclevel-2 tocsection-9">
  55. <a href="#White_border_around_tab_buttons"><span class="tocnumber">3.1</span> <span class="toctext">White border around tab buttons</span></a>
  56. </li>
  57. <li class="toclevel-2 tocsection-10">
  58. <a href="#Flashing_white_background_when_viewing_new_pages"><span class="tocnumber">3.2</span> <span class="toctext">Flashing white background when viewing new pages</span></a>
  59. </li>
  60. <li class="toclevel-2 tocsection-11">
  61. <a href="#Flashing_white_background_when_opening_new_tabs"><span class="tocnumber">3.3</span> <span class="toctext">Flashing white background when opening new tabs</span></a>
  62. </li>
  63. <li class="toclevel-2 tocsection-12">
  64. <a href="#Various_icons_are_hard_to_see_in_night_mode"><span class="tocnumber">3.4</span> <span class="toctext">Various icons are hard to see in night mode</span></a>
  65. </li>
  66. </ul>
  67. </li>
  68. </ul>
  69. </div>
  70. <h2>
  71. <span class="mw-headline" id="Enabling">Enabling</span>
  72. </h2>
  73. <p>
  74. Night mode can be enabled in the following ways:
  75. </p>
  76. <ul>
  77. <li>
  78. <b>Main Menu</b>: Choose <code>View</code> -&gt; <code>Toggle Night mode</code>
  79. </li>
  80. <li>
  81. <b>Options</b>: Go to <a href="/wiki/Special:XowaCfg%3Fgrp%3Dxowa.gui.nightmode" id="xolnki_2" title="Special:XowaCfg?grp=xowa.gui.nightmode">Special:XowaCfg?grp=xowa.gui.nightmode</a> and check <code>Enabled</code>
  82. </li>
  83. </ul>
  84. <h2>
  85. <span class="mw-headline" id="Color_control">Color control</span>
  86. </h2>
  87. <p>
  88. Colors for night mode are controlled by three different UI components:
  89. </p>
  90. <h3>
  91. <span class="mw-headline" id="Operating_System">Operating System</span>
  92. </h3>
  93. <p>
  94. Colors for the following must be changed at the Operating System level:
  95. </p>
  96. <ul>
  97. <li>
  98. The window title bar
  99. </li>
  100. <li>
  101. The main menu bar
  102. </li>
  103. <li>
  104. The vertical scroll-bar
  105. </li>
  106. </ul>
  107. <p>
  108. For example, on Windows 7, they can be changed at <code>Control Panel</code> -&gt; <code>Personalization</code>.
  109. </p>
  110. <p>
  111. Note that these can not be changed within XOWA, as the underlying UI framework library (SWT) does not allow it.
  112. </p>
  113. <h3>
  114. <span class="mw-headline" id="SWT">SWT</span>
  115. </h3>
  116. <p>
  117. Colors for the following are controlled by SWT:
  118. </p>
  119. <ul>
  120. <li>
  121. All button backgrounds
  122. </li>
  123. <li>
  124. The url bar
  125. </li>
  126. <li>
  127. The tab buttons
  128. </li>
  129. <li>
  130. The find box
  131. </li>
  132. <li>
  133. The progress box
  134. </li>
  135. </ul>
  136. <p>
  137. By default, a simple white on black theme is chosen. Exact colors can be chosen through <a href="/wiki/Special:XowaCfg%3Fgrp%3Dxowa.gui.nightmode" id="xolnki_3" title="Special:XowaCfg?grp=xowa.gui.nightmode">Special:XowaCfg?grp=xowa.gui.nightmode</a>.
  138. </p>
  139. <h3>
  140. <span class="mw-headline" id="CSS">CSS</span>
  141. </h3>
  142. <p>
  143. Colors for all HTML content are specified through the CSS. By default, XOWA uses a global css at C:\xowa_release\bin\any\xowa\html\css\nightmode\xowa_night.css.
  144. </p>
  145. <h3>
  146. <span class="mw-headline" id="Generating_a_night-mode_CSS_from_scratch">Generating a night-mode CSS from scratch</span>
  147. </h3>
  148. <p>
  149. The night-mode CSS can be generated using the following process:
  150. </p>
  151. <ul>
  152. <li>
  153. Go to <a href="http://userstyles.org" rel="nofollow" class="external free">http://userstyles.org</a>
  154. </li>
  155. <li>
  156. Search for Wikipedia
  157. </li>
  158. <li>
  159. Pick a user-style. For the current global CSS, I used <a href="https://userstyles.org/styles/105844/wikipedia-dark-st" rel="nofollow" class="external free">https://userstyles.org/styles/105844/wikipedia-dark-st</a>
  160. </li>
  161. <li>
  162. Click the "Show CSS" link
  163. </li>
  164. <li>
  165. Copy the CSS and place it in C:\xowa_release\bin\any\xowa\html\css\nightmode\xowa_night.css.
  166. </li>
  167. <li>
  168. Remove any line that starts with "@-moz-document"
  169. </li>
  170. <li>
  171. Remove any line that loads external urls (for example, loading images from <a href="http://imgur.com" rel="nofollow" class="external free">http://imgur.com</a>)
  172. </li>
  173. </ul>
  174. <h3>
  175. <span class="mw-headline" id="Specifying_a_night-mode_CSS_per_wiki">Specifying a night-mode CSS per wiki</span>
  176. </h3>
  177. <p>
  178. The night-mode CSS is chosen using the following priority list:
  179. </p>
  180. <ul>
  181. <li>
  182. <b>Wiki-specific</b>: XOWA first checks for a night-mode CSS in this location: C:\xowa_release\user\anonymous\wiki\your_wiki_name\html\xowa_night.css
  183. </li>
  184. <li>
  185. <b>User global</b>: If XOWA doesn't find a wiki-specific file, it checks for a user-defined global file here: C:\xowa_release\user\anonymous\app\overrides\bin\any\xowa\html\css\nightmode\xowa_night.css.
  186. </li>
  187. <li>
  188. <b>XOWA global</b>: If XOWA still doesn't find a CSS file, it uses the global file that is distributed with the XOWA application package here: C:\xowa_release\bin\any\xowa\html\css\nightmode\xowa_night.css
  189. </li>
  190. </ul>
  191. <dl>
  192. <dd>
  193. <b>Note that the XOWA global file should not be modified. Any modifications here will be lost in the next update.</b>
  194. </dd>
  195. </dl>
  196. <p>
  197. The above logic also applies to the night-mode logo: logo_night.png.
  198. </p>
  199. <h2>
  200. <span class="mw-headline" id="Known_issues">Known issues</span>
  201. </h2>
  202. <h3>
  203. <span class="mw-headline" id="White_border_around_tab_buttons">White border around tab buttons</span>
  204. </h3>
  205. <p>
  206. The tab buttons have white borders. Unfortunately these are specified thru SWT and cannot be changed.
  207. </p>
  208. <h3>
  209. <span class="mw-headline" id="Flashing_white_background_when_viewing_new_pages">Flashing white background when viewing new pages</span>
  210. </h3>
  211. <p>
  212. The HTML browser can sometimes flash white when viewing new pages. This seems to be an issue with the SWT browser control. It can be mitigated through the following
  213. </p>
  214. <ul>
  215. <li>
  216. Go to <a href="/wiki/Special:XowaCfg%3Fxowa.app.security" id="xolnki_4" title="Special:XowaCfg?xowa.app.security">Special:XowaCfg?xowa.app.security</a>
  217. </li>
  218. <li>
  219. Change <code>Load HTML to browser method</code> to <code>url</code>
  220. </li>
  221. </ul>
  222. <p>
  223. Note that this option is not changed automatically because it has a minor privacy implication (pages are saved temporarily to the disk instead of being set directly through memory)
  224. </p>
  225. <h3>
  226. <span class="mw-headline" id="Flashing_white_background_when_opening_new_tabs">Flashing white background when opening new tabs</span>
  227. </h3>
  228. <p>
  229. The HTML browswer can still flash sometimes when opening new tabs (Ctrl+T). This is an issue with the SWT tab control. Unfortunately, this cannot be changed
  230. </p>
  231. <h3>
  232. <span class="mw-headline" id="Various_icons_are_hard_to_see_in_night_mode">Various icons are hard to see in night mode</span>
  233. </h3>
  234. <p>
  235. For example, the save button on the New Personal Wikis screen is a black floppy disk. This is hard to distinguish against a black background.
  236. </p>
  237. <p>
  238. By default, XOWA is designed for a non-night-mode setting ("day mode"). Most icons will look fine for day mode. Unfortunately, resources are not available to always support both a "day mode" and a "night mode" theme.
  239. </p>
  240. <p>
  241. Of course, contributions are always welcome. If you want to contribute a unified night mode theme, please contact me via <a href="/wiki/Help/Feedback" id="xolnki_5" title="Help/Feedback">Help/Feedback</a>
  242. </p>
  243. <div id="catlinks" class="catlinks">
  244. <div id="mw-normal-catlinks" class="mw-normal-catlinks">
  245. <a href="/wiki/Special:Categories" title="Special:Categories">Category</a>:
  246. <ul>
  247. <li>
  248. <a href="/wiki/Category:Global_config" title="Category:Global config">Global config</a>
  249. </li>
  250. </ul>
  251. </div>
  252. <div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-user-shown">Hidden categories:
  253. <ul>
  254. </ul>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. <div id="mw-head" class="noprint">
  261. <div id="left-navigation">
  262. <div id="p-namespaces" class="vectorTabs">
  263. <h3>Namespaces</h3>
  264. <ul>
  265. <li id="ca-nstab-main" class="selected"><span><a id="ca-nstab-main-href" href="index.html">Page</a></span></li>
  266. </ul>
  267. </div>
  268. </div>
  269. </div>
  270. <div id='mw-panel' class='noprint'>
  271. <div id='p-logo'>
  272. <a style="background-image: url(https://gnosygnu.github.io/xowa/xowa_logo.png);" href="http://xowa.org/" title="Visit the main page"></a>
  273. </div>
  274. <div class="portal" id='xowa-portal-home'>
  275. <h3>XOWA</h3>
  276. <div class="body">
  277. <ul>
  278. <li><a href="http://xowa.org/index.html" title='Visit the main page'>Main page</a></li>
  279. <li><a href="http://xowa.org/screenshots.html" title='See screenshots of XOWA'>Screenshots</a></li>
  280. <li><a href="https://www.youtube.com/watch?v=q0qbXYXEH6M" title="See a video of XOWA Desktop in action">Video</a></li>
  281. <li><a href="http://xowa.org/home/wiki/Help/Download_XOWA.html" title='Download the XOWA application'>Download XOWA</a></li>
  282. <li><a href="http://xowa.org/home/wiki/Dashboard/Image_databases.html" title='Download offline wikis and image databases'>Download wikis</a></li>
  283. </ul>
  284. </div>
  285. </div>
  286. <div class="portal" id='xowa-portal-started'>
  287. <h3>Getting started</h3>
  288. <div class="body">
  289. <ul>
  290. <li><a href="http://xowa.org/home/wiki/App/Setup/System_requirements.html" title='Get XOWA&apos;s system requirements'>Requirements</a></li>
  291. <li><a href="http://xowa.org/home/wiki/App/Setup/Installation.html" title='Get instructions for installing XOWA'>Installation</a></li>
  292. <li><a href="http://xowa.org/home/wiki/App/Import/Simple_Wikipedia.html" title='Learn how to set up Simple Wikipedia'>Simple Wikipedia</a></li>
  293. <li><a href="http://xowa.org/home/wiki/App/Import/English_Wikipedia.html" title='Learn how to set up English Wikipedia'>English Wikipedia</a></li>
  294. <li><a href="http://xowa.org/home/wiki/App/Import/Other_wikis.html" title='Learn how to set up other Wikipedias'>Other Wikipedias</a></li>
  295. </ul>
  296. </div>
  297. </div>
  298. <div class="portal" id='xowa-portal-android'>
  299. <h3>Android</h3>
  300. <div class="body">
  301. <ul>
  302. <li><a href="http://xowa.org/home/wiki/Android/Setup.html" title='Setup XOWA on your Android device'>Setup</a></li>
  303. <li><a href="https://www.youtube.com/watch?v=jsMTBxGweUw" title="See a video of XOWA Android in action">Video</a></li>
  304. </ul>
  305. </div>
  306. </div>
  307. <div class="portal" id='xowa-portal-help'>
  308. <h3>Help</h3>
  309. <div class="body">
  310. <ul>
  311. <li><a href="http://xowa.org/home/wiki/Help/About.html" title='Get more information about XOWA'>About</a></li>
  312. <li><a href="http://xowa.org/home/wiki/Help/Contents.html" title='View a list of help topics'>Contents</a></li>
  313. <li><a href="http://xowa.org/home/wiki/Help/Media.html" title='Read what others have written about XOWA'>Media</a></li>
  314. <li><a href="http://xowa.org/home/wiki/Help/Feedback.html" title='Questions? Comments? Leave feedback for XOWA'>Feedback</a></li>
  315. </ul>
  316. </div>
  317. </div>
  318. <div class="portal" id='xowa-portal-blog'>
  319. <h3>Blog</h3>
  320. <div class="body">
  321. <ul>
  322. <li><a href="http://xowa.org/home/wiki/Blog.html" title='Follow XOWA''s development process'>Current</a></li>
  323. </ul>
  324. </div>
  325. </div>
  326. <div class="portal" id='xowa-portal-links'>
  327. <h3>Links</h3>
  328. <div class="body">
  329. <ul>
  330. <li><a href="http://dumps.wikimedia.org/backup-index.html" title="Get wiki datababase dumps directly from Wikimedia">Wikimedia dumps</a></li>
  331. <li><a href="https://archive.org/search.php?query=xowa" title="Search archive.org for XOWA files">XOWA @ archive.org</a></li>
  332. <li><a href="http://en.wikipedia.org" title="Visit Wikipedia (and compare to XOWA!)">English Wikipedia</a></li>
  333. </ul>
  334. </div>
  335. </div>
  336. <div class="portal" id='xowa-portal-donate'>
  337. <h3>Donate</h3>
  338. <div class="body">
  339. <ul>
  340. <li><a href="https://archive.org/donate/index.php" title="Support archive.org!">archive.org</a></li><!-- listed first due to recent fire damages: http://blog.archive.org/2013/11/06/scanning-center-fire-please-help-rebuild/ -->
  341. <li><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector" title="Support Wikipedia!">Wikipedia</a></li>
  342. <li><a href="http://xowa.org/home/wiki/Help/Donate.html" title="Support XOWA!">XOWA</a></li>
  343. </ul>
  344. </div>
  345. </div>
  346. </div>
  347. </body>
  348. </html>