Skip to content

Commit

Permalink
Adding HTML styling, CSSs, license and credits which resolved dvorka#226
Browse files Browse the repository at this point in the history
.
  • Loading branch information
dvorka committed Mar 19, 2018
1 parent 49883b4 commit 54eb5cf
Show file tree
Hide file tree
Showing 18 changed files with 391 additions and 40 deletions.
7 changes: 5 additions & 2 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ Big thanks to 3rd party content authors:
* David Parsons (Discount - MD rendering - library)
* Google (Google C++ unit testing framework)
* Raimund Hocke (SikuliX - GUI automation testing)
* Jamie McGowan (Remarkable - inspiration)
* Knut Sveidqvist (Mermaid.js - diagrams and flowcharts rendering in HTML)
* AMS and SIAM (MathJax.js - math rendering in HTML)
* Ivan Sagalaev (Highlight.js - source code syntax highlighting)
* Jamie McGowan (Remarkable - inspiration and code)
* Apiary (API blueprints - test data)
* Mark Summerfield (Advanced Qt Programming book examples - code snippets)
* Andres Mejia (Aho-Corasick algoritm implementation - code snippets)
* Andres Mejia (Aho-Corasick algorithm implementation - code snippets)

See [licenses](./licenses) folder for 3rd party content licensing details.

Expand Down
16 changes: 16 additions & 0 deletions app/mf-resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,20 @@
<file>resources/qt/translations/mindforger_cs.qm</file>
<file>resources/qt/translations/mindforger_en.qm</file>
</qresource>
<qresource prefix="/html-css">
<file alias="byword-dark.css">resources/qt/css/byword-dark.css</file>
<file alias="clearness-dark.css">resources/qt/css/clearness-dark.css</file>
<file alias="clearness">resources/qt/css/clearness.css</file>
<file alias="github.css">resources/qt/css/github.css</file>
<file alias="markdown.css">resources/qt/css/markdown.css</file>
<file alias="solarized-dark.css">resources/qt/css/solarized-dark.css</file>
<file alias="solarized-light.css">resources/qt/css/solarized-light.css</file>
<file alias="foghorn.css">resources/qt/css/foghorn.css</file>
<file alias="handwriting.css">resources/qt/css/handwriting.css</file>
<file alias="metro-vibes-dark.css">resources/qt/css/metro-vibes-dark.css</file>
<file alias="metro-vibes.css">resources/qt/css/metro-vibes.css</file>
<file alias="modern.css">resources/qt/css/modern.css</file>
<file alias="remarkable-dark.css">resources/qt/css/remarkable-dark.css</file>
<file alias="screen.css">resources/qt/css/screen.css</file>
</qresource>
</RCC>
1 change: 1 addition & 0 deletions app/resources/qt/css/foghorn.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/resources/qt/css/handwriting.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/resources/qt/css/metro-vibes-dark.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/resources/qt/css/metro-vibes.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/resources/qt/css/modern.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/resources/qt/css/remarkable-dark.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/resources/qt/css/screen.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion app/src/qt/look_n_feel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ void LookAndFeels::setDarkTheme()
mindforgerApplication->setStyleSheet("QToolTip { color: #ffffff; background-color: #008c00; border: 1px solid white; }");
//palette.setColor(QPalette::ToolTipBase, Qt::blue);
//palette.setColor(QPalette::ToolTipText, Qt::red);

Configuration::getInstance().setUiHtmlThemeName(UI_HTML_THEME_BYWORD_DARK);
}

/*
Expand Down Expand Up @@ -148,6 +150,8 @@ void LookAndFeels::setLightTheme()
mindforgerApplication->setStyleSheet("QToolTip { color: #ffffff; background-color: #ED764D; border: 1px solid white; }");

mindforgerApplication->setPalette(palette);

Configuration::getInstance().setUiHtmlThemeName(UI_HTML_THEME_HANDWRITING);
}

void LookAndFeels::setBlackTheme()
Expand Down Expand Up @@ -208,6 +212,8 @@ void LookAndFeels::setBlackTheme()

// IMPROVE tooltips are set in two ways
mindforgerApplication->setStyleSheet("QToolTip { color: #ffffff; background-color: #000000; border: 1px solid white; }");
}

Configuration::getInstance().setUiHtmlThemeName(UI_HTML_THEME_BYWORD_DARK);
}

} // m8r namespace
8 changes: 1 addition & 7 deletions app/src/qt/mindforger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,7 @@ int main(int argc, char *argv[])
}

// setup application
QFile iconFile(":/icons/mindforger-icon.png");
if(!iconFile.open(QFile::ReadOnly)) {
cerr << "Unable to find MindForger icon!" << endl;
} else {
mindforgerApplication.setWindowIcon(QIcon(":/icons/mindforger-icon.png"));
}

mindforgerApplication.setWindowIcon(QIcon(":/icons/mindforger-icon.png"));
m8r::l8n(mindforgerApplication);

// choose L&F
Expand Down
8 changes: 6 additions & 2 deletions lib/src/config/configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void Configuration::reset()
writeMetadata = true;
saveReadsMetadata = DEFAULT_SAVE_READS_METADATA;
timeScopeAsString.assign(DEFAULT_TIME_SCOPE);
md2HtmlOptions = 0;
md2HtmlOptions = 0
// change default options by enabling flags below
// | Configuration::MdToHtmlOption::AutolinkOption
// | Configuration::MdToHtmlOption::NoStrikethroughOption
Expand All @@ -80,13 +80,17 @@ void Configuration::reset()
// | Configuration::MdToHtmlOption::NoSmartypantsOption
// | Configuration::MdToHtmlOption::ExtraFootnoteOption
// | Configuration::MdToHtmlOption::NoSuperscriptOption;
// IMPROVE add math support
| Configuration::MdToHtmlOption::MathSupport
| Configuration::MdToHtmlOption::MathInlineSupport
| Configuration::MdToHtmlOption::CodeHighlighting
| Configuration::MdToHtmlOption::DiagramSupport;

// GUI
uiViewerShowMetadata = true;
uiEditorEnableSyntaxHighlighting = true;
uiEditorShowLineNumbers = true;
uiThemeName.assign(UI_DEFAULT_THEME);
uiHtmlThemeName.assign(UI_DEFAULT_HTML_THEME);
uiFontPointSize = UI_DEFAULT_FONT_POINT_SIZE;
uiShowNotebookEditButton = DEFAULT_SHOW_NOTEBOOK_EDIT_BUTTON;
}
Expand Down
Loading

0 comments on commit 54eb5cf

Please sign in to comment.