Added a new built-in style 'Modern' (Prefs->Interface->Display Style->Modern)

This commit is contained in:
Tvangeste 2013-03-23 17:48:31 +01:00
parent cd8b36aaad
commit d1787dd98b
4 changed files with 204 additions and 0 deletions

133
article-style-st-modern.css Normal file
View file

@ -0,0 +1,133 @@
body
{
margin-top: 1px;
margin-right: 3px;
margin-left: 2px;
margin-bottom: 3px;
background: white;
font-family: Tahoma, Segoe UI, Palatino Linotype, Arial Unicode MS;
}
a
{
text-decoration: none;
color: darkblue;
}
a:hover
{
text-decoration: underline;
}
.gdarticle
{
margin-top: 0.1em;
margin-bottom: 0.4em;
padding: 5px;
border: 1px solid #d0dde2;
border-radius: 8px;
}
.gdactivearticle
{
border: 1px solid #3399FF;
}
.gdarticleseparator + script + .gdactivearticle .gddictname
{
border-top: 1px solid #3399FF;
}
.gdarticleseparator
{
display: none;
}
.gddictname
{
font-size: 12px;
font-weight: normal;
float: right;
border: 0px;
border-top-right-radius: 8px;
border-bottom-left-radius: 6px;
margin: -6px;
margin-bottom: 5px;
margin-left: 2px;
padding-right: 0.4em;
color: #4480f8;
background: #E0E8F0;
-webkit-user-select: none;
user-select: none;
cursor: default;
}
.gdactivearticle .gddictname
{
font-size: 13px;
font-weight: normal;
margin: -6px;
margin-bottom: 5px;
margin-left: 2px;
float: right;
border: 1px solid #3399FF;
color: #0066cc;
background: #deecf8;
}
.gddicticon
{
display: inline;
vertical-align: text-bottom;
float: right;
padding-right: 0em;
padding-left: 0.3em;
}
/* The first headword in a (possibly) multi-headword DSL article */
.gdarticlebody > span:first-child .dsl_headwords,
.gdarticlebody > h3:first-child
{
margin-top: -3px;
display: inline-block;
}
.gdspellsuggestion
{
/* Add some vertical space before the article */
margin-top: 1.5em;
}
.dsl_ex
{
color: steelblue;
}
.dsl_stress
{
color: darkblue;
}
.dsl_stress_without_accent {
display:inline;
}
.dsl_stress_with_accent {
display: none;
}
.dsl_p .dsl_ex .dsl_lang
{
color: green;
}
::selection {
background:#cc0000;
color:#fff;
}
code::selection {
background: #333333;
}

View file

@ -78,6 +78,7 @@ Preferences::Preferences( QWidget * parent, Config::Preferences const & p ):
} }
ui.displayStyle->addItem( QIcon( ":/icons/programicon.png" ), tr( "Default" ), QString() ); ui.displayStyle->addItem( QIcon( ":/icons/programicon.png" ), tr( "Default" ), QString() );
ui.displayStyle->addItem( QIcon( ":/icons/programicon.png" ), tr( "Modern" ), QString( "modern" ) );
ui.displayStyle->addItem( QIcon( ":/icons/icon32_dsl.png" ), tr( "Lingvo" ), QString( "lingvo" ) ); ui.displayStyle->addItem( QIcon( ":/icons/icon32_dsl.png" ), tr( "Lingvo" ), QString( "lingvo" ) );
ui.displayStyle->addItem( QIcon( ":/icons/icon32_bgl.png" ), tr( "Babylon" ), QString( "babylon" ) ); ui.displayStyle->addItem( QIcon( ":/icons/icon32_bgl.png" ), tr( "Babylon" ), QString( "babylon" ) );

68
qt-style-st-modern.css Normal file
View file

@ -0,0 +1,68 @@
MainWindow #translateLine, ScanPopup #translateLine, MainWindow #wordList, MainWindow #dictsPane #dictsList,
MainWindow #historyPane #historyList
{
background: white;
}
/* WARNING: hides all separators! */
#navToolbar::separator {
width: 0px;
}
/* Another way to hide specific separators */
#navToolbar #beforeOptionsSeparator, #navToolbar #beforeScanPopupSeparator, #navToolbar #afterScanPopupSeparator, #navToolbar #separatorBeforeZoom, #navToolbar #separatorBeforeSave {
background: rgba(0,0,0,0%);
width: 0px;
margin: -3px;
}
/* Hide various buttons in the toolbar: */
#navToolbar #menuButtonXX, #navToolbar #soundButtonXX, #navToolbar #backButtonXX, #navToolbar #forwardButtonXX, #navToolbar #zoomInButtonXX, #navToolbar #zoomOutButtonXX, #navToolbar #zoomBaseButtonXX, #navToolbar #saveArticleButton, #navToolbar #printButton {
width: 0px;
height: 0px;
margin: -3px;
}
/* remove the main toolbar handle */
#navToolbar::handle, #dictionaryBar::handle {
image: none;
width: 0px;
margin-left: 1px;
}
#navToolbar #scanPopupButton {
margin-left: 5px;
}
/* Colored header for the "Found in Dictionaries:" pane */
#dictsPaneTitleBar {
background: lightblue;
margin: 2px;
}
/* Colored header for the History Pane */
#historyPaneTitleBar {
background: lightsteelblue;
margin: 2px;
}
/* Thin separators between the main UI and sidebars */
QMainWindow::separator {
width: 1px; /* when vertical */
height: 1px; /* when horizontal */
}
ScanPopup #goBackButtonAA,
/* ScanPopup #queryError, */
ScanPopup #goForwardButtonAA,
ScanPopup #wordListButtonXX,
ScanPopup #pronounceButtonAA,
ScanPopup #sendWordButtonXX
/* ScanPopup #showDictionaryBar, */
/* ScanPopup #pinButton */
{
width: 0px;
height: 0px;
margin: -4px;
}

View file

@ -57,5 +57,7 @@
<file>icons/system-search.png</file> <file>icons/system-search.png</file>
<file>icons/menu_button.png</file> <file>icons/menu_button.png</file>
<file>icons/clear.png</file> <file>icons/clear.png</file>
<file>article-style-st-modern.css</file>
<file>qt-style-st-modern.css</file>
</qresource> </qresource>
</RCC> </RCC>