Enhancements to icon theme, defaults on linux to default icon theme.
This commit is contained in:
		
							parent
							
								
									782ec0c57d
								
							
						
					
					
						commit
						1d862fdd2b
					
				
					 3 changed files with 21 additions and 4 deletions
				
			
		|  | @ -128,7 +128,13 @@ | ||||||
| #define APP_SKIN_DEFAULT    "vergilius" | #define APP_SKIN_DEFAULT    "vergilius" | ||||||
| #define APP_SKIN_METADATA_FILE "metadata.xml" | #define APP_SKIN_METADATA_FILE "metadata.xml" | ||||||
| #define APP_STYLE_DEFAULT   "Fusion" | #define APP_STYLE_DEFAULT   "Fusion" | ||||||
|  | 
 | ||||||
|  | #if defined(Q_OS_LINUX) | ||||||
|  | #define APP_THEME_DEFAULT   "" | ||||||
|  | #else | ||||||
| #define APP_THEME_DEFAULT   "Faenza" | #define APP_THEME_DEFAULT   "Faenza" | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #define APP_NO_THEME        "" | #define APP_NO_THEME        "" | ||||||
| #define APP_THEME_SUFFIX    ".png" | #define APP_THEME_SUFFIX    ".png" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										6
									
								
								src/librssguard/gui/settings/settingsgui.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										6
									
								
								src/librssguard/gui/settings/settingsgui.cpp
									
										
									
									
									
										
										
										Normal file → Executable file
									
								
							|  | @ -103,7 +103,11 @@ void SettingsGui::loadSettings() { | ||||||
|     if (icon_theme_name == APP_NO_THEME) { |     if (icon_theme_name == APP_NO_THEME) { | ||||||
|       // Add just "no theme" on other systems.
 |       // Add just "no theme" on other systems.
 | ||||||
|       //: Label for disabling icon theme.
 |       //: Label for disabling icon theme.
 | ||||||
|       m_ui->m_cmbIconTheme->addItem(tr("no icon theme/system icon theme"), APP_NO_THEME); | #if defined(Q_OS_LINUX) | ||||||
|  |       m_ui->m_cmbIconTheme->addItem(tr("system icon theme"), APP_NO_THEME); | ||||||
|  | #else | ||||||
|  |       m_ui->m_cmbIconTheme->addItem(tr("no icon theme"), APP_NO_THEME); | ||||||
|  | #endif | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|       m_ui->m_cmbIconTheme->addItem(icon_theme_name, icon_theme_name); |       m_ui->m_cmbIconTheme->addItem(icon_theme_name, icon_theme_name); | ||||||
|  |  | ||||||
|  | @ -85,17 +85,24 @@ void IconFactory::loadCurrentIconTheme() { | ||||||
|   } |   } | ||||||
|   else { |   else { | ||||||
|     // Desired icon theme is not currently available.
 |     // Desired icon theme is not currently available.
 | ||||||
|     // Install "default" icon theme instead.
 |     // Activate "default" or "no" icon theme instead.
 | ||||||
|     qWarning("Icon theme '%s' cannot be loaded because it is not installed. No icon theme (or default/system icon theme) is loaded now.", | #if defined(Q_OS_LINUX) | ||||||
|  |     qWarning("Icon theme '%s' cannot be loaded. Activating \"system default\" icon theme.", | ||||||
|  |              qPrintable(theme_name_from_settings)); | ||||||
|  | #else | ||||||
|  |     qWarning("Icon theme '%s' cannot be loaded because it is not installed. Activating \"no\" icon theme.", | ||||||
|              qPrintable(theme_name_from_settings)); |              qPrintable(theme_name_from_settings)); | ||||||
|     QIcon::setThemeName(APP_NO_THEME); |     QIcon::setThemeName(APP_NO_THEME); | ||||||
|  | #endif | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| QStringList IconFactory::installedIconThemes() const { | QStringList IconFactory::installedIconThemes() const { | ||||||
|   QStringList icon_theme_names; |   QStringList icon_theme_names; | ||||||
| 
 | 
 | ||||||
|   icon_theme_names << APP_NO_THEME; //<< QSL("Faenza");
 | #if !defined(Q_OS_LINUX) | ||||||
|  |   icon_theme_names << APP_NO_THEME; | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
|   // Iterate all directories with icon themes.
 |   // Iterate all directories with icon themes.
 | ||||||
|   QStringList icon_themes_paths = QIcon::themeSearchPaths(); |   QStringList icon_themes_paths = QIcon::themeSearchPaths(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue