Added shared misc icons.
@ -451,7 +451,7 @@ if(WIN32)
|
||||
install(FILES ${APP_DLLS_QT5_MSVC2013_PLATFORMS} DESTINATION ./platforms)
|
||||
install(FILES ${APP_DLLS_QT5_MSVC2013_SQLDRIVERS} DESTINATION ./sqldrivers)
|
||||
|
||||
install(FILES ${MISC_ICONS} DESTINATION ./icons/)
|
||||
install(DIRECTORY resources/graphics/misc DESTINATION ./icons)
|
||||
install(FILES resources/graphics/Faenza/index.theme DESTINATION ./icons/Faenza)
|
||||
install(DIRECTORY ${FAENZA_FOLDERS} DESTINATION ./icons/Faenza)
|
||||
|
||||
@ -498,7 +498,7 @@ elseif(APPLE)
|
||||
# Setup custom "bundle" prefix.
|
||||
set(APPLE_PREFIX ${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources)
|
||||
|
||||
install(FILES ${MISC_ICONS} DESTINATION ${APPLE_PREFIX}/icons/)
|
||||
install(DIRECTORY resources/graphics/misc DESTINATION ${APPLE_PREFIX}/icons)
|
||||
install(FILES resources/graphics/Faenza/index.theme DESTINATION ${APPLE_PREFIX}/icons/Faenza)
|
||||
install(DIRECTORY ${FAENZA_FOLDERS} DESTINATION ${APPLE_PREFIX}/icons/Faenza)
|
||||
|
||||
@ -514,7 +514,7 @@ elseif(UNIX)
|
||||
|
||||
install(TARGETS ${EXE_NAME} RUNTIME DESTINATION bin)
|
||||
|
||||
install(FILES ${MISC_ICONS} DESTINATION share/${APP_LOW_NAME}/icons)
|
||||
install(DIRECTORY resources/graphics/misc DESTINATION share/${APP_LOW_NAME}/icons)
|
||||
install(DIRECTORY resources/initial_feeds DESTINATION share/${APP_LOW_NAME})
|
||||
install(DIRECTORY resources/skins/base DESTINATION share/${APP_LOW_NAME}/skins)
|
||||
install(DIRECTORY resources/misc DESTINATION share/${APP_LOW_NAME})
|
||||
|
BIN
resources/graphics/misc/flags/cs_CZ.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/graphics/misc/flags/da_DK.png
Normal file
After Width: | Height: | Size: 809 B |
BIN
resources/graphics/misc/flags/de_DE.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
resources/graphics/misc/flags/en_GB.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
resources/graphics/misc/flags/en_US.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/graphics/misc/flags/fr_FR.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
resources/graphics/misc/flags/he_IL.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/graphics/misc/flags/id_ID.png
Normal file
After Width: | Height: | Size: 614 B |
BIN
resources/graphics/misc/flags/it_IT.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/graphics/misc/flags/ja_JP.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
resources/graphics/misc/flags/lt_LT.png
Normal file
After Width: | Height: | Size: 744 B |
BIN
resources/graphics/misc/flags/nl_NL.png
Normal file
After Width: | Height: | Size: 824 B |
BIN
resources/graphics/misc/flags/pt_BR.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
resources/graphics/misc/flags/sv_SE.png
Normal file
After Width: | Height: | Size: 906 B |
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 397 B After Width: | Height: | Size: 397 B |
@ -455,7 +455,7 @@ void FormSettings::loadLanguage() {
|
||||
item->setText(1, language.m_code);
|
||||
item->setText(2, language.m_version);
|
||||
item->setText(3, language.m_author);
|
||||
item->setIcon(0, qApp->icons()->fromTheme(QString(FLAG_ICON_SUBFOLDER) + QDir::separator() + language.m_code));
|
||||
item->setIcon(0, qApp->icons()->miscIcon(QString(FLAG_ICON_SUBFOLDER) + QDir::separator() + language.m_code));
|
||||
}
|
||||
|
||||
QList<QTreeWidgetItem*> matching_items = m_ui->m_treeLanguages->findItems(qApp->localization()->loadedLanguage(), Qt::MatchContains, 1);
|
||||
|
@ -17,10 +17,7 @@ QVariant MessageTextBrowser::loadResource(int type, const QUrl &name) {
|
||||
switch (type) {
|
||||
case QTextDocument::ImageResource: {
|
||||
if (m_imagePlaceholder.isNull()) {
|
||||
// TODO: opravit, zahrnout ten obrázek asi.
|
||||
m_imagePlaceholder = QPixmap(QString(APP_THEME_PATH) +
|
||||
QDir::separator() +
|
||||
QSL("image-placeholder.png")).scaledToWidth(20, Qt::FastTransformation);
|
||||
m_imagePlaceholder = qApp->icons()->miscPixmap(QSL("image-placeholder")).scaledToWidth(20, Qt::FastTransformation);
|
||||
}
|
||||
|
||||
emit imageRequested(name.toString());
|
||||
|
@ -70,6 +70,14 @@ QIcon IconFactory::fromTheme(const QString &name) {
|
||||
return QIcon::fromTheme(name);
|
||||
}
|
||||
|
||||
QPixmap IconFactory::miscPixmap(const QString &name) {
|
||||
return QPixmap(QString(APP_THEME_PATH) + QDir::separator() + "misc" + QDir::separator() + name + ".png");
|
||||
}
|
||||
|
||||
QIcon IconFactory::miscIcon(const QString &name) {
|
||||
return QIcon(QString(APP_THEME_PATH) + QDir::separator() + "misc" + QDir::separator() + name + ".png");
|
||||
}
|
||||
|
||||
void IconFactory::setupSearchPaths() {
|
||||
QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() << APP_THEME_PATH);
|
||||
qDebug("Available icon theme paths: %s.",
|
||||
@ -120,7 +128,7 @@ QStringList IconFactory::installedIconThemes() const {
|
||||
icon_themes_paths.removeDuplicates();
|
||||
|
||||
foreach (const QString &icon_path, icon_themes_paths) {
|
||||
const QDir icon_dir(icon_path);
|
||||
const QDir icon_dir(icon_path);
|
||||
|
||||
// Iterate all icon themes in this directory.
|
||||
foreach (const QFileInfo &icon_theme_path, icon_dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot |
|
||||
|
@ -50,6 +50,9 @@ class IconFactory : public QObject {
|
||||
// "no icon theme" is set.
|
||||
QIcon fromTheme(const QString &name);
|
||||
|
||||
QPixmap miscPixmap(const QString &name);
|
||||
QIcon miscIcon(const QString &name);
|
||||
|
||||
// Adds custom application path to be search for icons.
|
||||
void setupSearchPaths();
|
||||
|
||||
|
@ -70,8 +70,6 @@ QString OwnCloudServiceEntryPoint::author() const {
|
||||
}
|
||||
|
||||
QIcon OwnCloudServiceEntryPoint::icon() const {
|
||||
return QIcon(QString(APP_THEME_PATH) +
|
||||
QDir::separator() +
|
||||
QSL("owncloud.png"));
|
||||
return qApp->icons()->miscIcon(QSL("owncloud"));
|
||||
}
|
||||
|
||||
|
@ -59,9 +59,7 @@ QString TtRssServiceEntryPoint::author() const {
|
||||
}
|
||||
|
||||
QIcon TtRssServiceEntryPoint::icon() const {
|
||||
return QIcon(QString(APP_THEME_PATH) +
|
||||
QDir::separator() +
|
||||
QSL("tt-rss.png"));
|
||||
return qApp->icons()->miscIcon(QSL("tt-rss"));
|
||||
}
|
||||
|
||||
QString TtRssServiceEntryPoint::code() const {
|
||||
|