mirror of
				https://github.com/RetroDECK/ES-DE.git
				synced 2025-04-10 19:15:13 +00:00 
			
		
		
		
	Added menu title per-language font sizing to the entire application
This commit is contained in:
		
							parent
							
								
									298b371715
								
							
						
					
					
						commit
						d86923fb98
					
				|  | @ -43,8 +43,10 @@ GuiApplicationUpdater::GuiApplicationUpdater() | |||
|     setDownloadPath(); | ||||
| 
 | ||||
|     // Set up grid.
 | ||||
|     mTitle = std::make_shared<TextComponent>(_("APPLICATION UPDATER"), Font::get(FONT_SIZE_LARGE), | ||||
|                                              mMenuColorTitle, ALIGN_CENTER); | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         _("APPLICATION UPDATER"), | ||||
|         Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), mMenuColorTitle, | ||||
|         ALIGN_CENTER); | ||||
|     mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true, glm::ivec2 {4, 1}, | ||||
|                    GridFlags::BORDER_BOTTOM); | ||||
| 
 | ||||
|  |  | |||
|  | @ -71,8 +71,9 @@ GuiMetaDataEd::GuiMetaDataEd(MetaDataList* md, | |||
|     addChild(&mBackground); | ||||
|     addChild(&mGrid); | ||||
| 
 | ||||
|     mTitle = std::make_shared<TextComponent>(_("EDIT METADATA"), Font::get(FONT_SIZE_LARGE), | ||||
|                                              mMenuColorTitle, ALIGN_CENTER); | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         _("EDIT METADATA"), Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), | ||||
|         mMenuColorTitle, ALIGN_CENTER); | ||||
|     mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true, glm::ivec2 {2, 2}); | ||||
| 
 | ||||
|     // Extract possible subfolders from the path.
 | ||||
|  |  | |||
|  | @ -37,7 +37,9 @@ GuiOfflineGenerator::GuiOfflineGenerator(const std::queue<FileData*>& gameQueue) | |||
| 
 | ||||
|     // Header.
 | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         _("MIXIMAGE OFFLINE GENERATOR"), Font::get(FONT_SIZE_LARGE), mMenuColorTitle, ALIGN_CENTER); | ||||
|         _("MIXIMAGE OFFLINE GENERATOR"), | ||||
|         Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), mMenuColorTitle, | ||||
|         ALIGN_CENTER); | ||||
|     mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true, glm::ivec2 {6, 1}); | ||||
| 
 | ||||
|     mStatus = std::make_shared<TextComponent>(_("NOT STARTED"), Font::get(FONT_SIZE_MEDIUM), | ||||
|  |  | |||
|  | @ -90,8 +90,10 @@ GuiOrphanedDataCleanup::GuiOrphanedDataCleanup(std::function<void()> reloadCallb | |||
|     } | ||||
| 
 | ||||
|     // Set up grid.
 | ||||
|     mTitle = std::make_shared<TextComponent>(_("ORPHANED DATA CLEANUP"), Font::get(FONT_SIZE_LARGE), | ||||
|                                              mMenuColorTitle, ALIGN_CENTER); | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         _("ORPHANED DATA CLEANUP"), | ||||
|         Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), mMenuColorTitle, | ||||
|         ALIGN_CENTER); | ||||
|     mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true, glm::ivec2 {4, 1}, | ||||
|                    GridFlags::BORDER_NONE); | ||||
| 
 | ||||
|  |  | |||
|  | @ -49,8 +49,10 @@ GuiScraperMulti::GuiScraperMulti( | |||
|         mQueueCountPerSystem[(*it).first] = std::make_pair(0, (*it).second); | ||||
| 
 | ||||
|     // Set up grid.
 | ||||
|     mTitle = std::make_shared<TextComponent>(_("SCRAPING IN PROGRESS"), Font::get(FONT_SIZE_LARGE), | ||||
|                                              mMenuColorTitle, ALIGN_CENTER); | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         _("SCRAPING IN PROGRESS"), | ||||
|         Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), mMenuColorTitle, | ||||
|         ALIGN_CENTER); | ||||
|     mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true, glm::ivec2 {2, 2}); | ||||
| 
 | ||||
|     mSystem = std::make_shared<TextComponent>(_("SYSTEM"), Font::get(FONT_SIZE_MEDIUM), | ||||
|  |  | |||
|  | @ -49,7 +49,8 @@ GuiScraperSingle::GuiScraperSingle(ScraperSearchParams& params, | |||
|     mGameName = std::make_shared<TextComponent>( | ||||
|         scrapeName + | ||||
|             ((mSearchParams.game->getType() == FOLDER) ? "  " + ViewController::FOLDER_CHAR : ""), | ||||
|         Font::get(FONT_SIZE_LARGE), mMenuColorPrimary, ALIGN_CENTER); | ||||
|         Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), mMenuColorPrimary, | ||||
|         ALIGN_CENTER); | ||||
|     mGameName->setColor(mMenuColorTitle); | ||||
|     mGrid.setEntry(mGameName, glm::ivec2 {0, 0}, false, true, glm::ivec2 {2, 2}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -45,8 +45,10 @@ GuiThemeDownloader::GuiThemeDownloader(std::function<void()> updateCallback) | |||
|                                                                        FONT_SIZE_SMALL}; | ||||
| 
 | ||||
|     // Set up main grid.
 | ||||
|     mTitle = std::make_shared<TextComponent>(_("THEME DOWNLOADER"), Font::get(FONT_SIZE_LARGE), | ||||
|                                              mMenuColorTitle, ALIGN_CENTER); | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         _("THEME DOWNLOADER"), | ||||
|         Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), mMenuColorTitle, | ||||
|         ALIGN_CENTER); | ||||
|     mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true, glm::ivec2 {2, 2}, | ||||
|                    GridFlags::BORDER_BOTTOM); | ||||
| 
 | ||||
|  |  | |||
|  | @ -35,9 +35,10 @@ GuiDetectDevice::GuiDetectDevice(bool firstRun, | |||
|     addChild(&mGrid); | ||||
| 
 | ||||
|     // Title.
 | ||||
|     mTitle = | ||||
|         std::make_shared<TextComponent>(firstRun ? _("WELCOME") : _("CONFIGURE INPUT DEVICE"), | ||||
|                                         Font::get(FONT_SIZE_LARGE), mMenuColorTitle, ALIGN_CENTER); | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         firstRun ? _("WELCOME") : _("CONFIGURE INPUT DEVICE"), | ||||
|         Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), mMenuColorTitle, | ||||
|         ALIGN_CENTER); | ||||
|     mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true, glm::ivec2 {1, 1}, | ||||
|                    GridFlags::BORDER_BOTTOM); | ||||
| 
 | ||||
|  |  | |||
|  | @ -54,8 +54,9 @@ GuiInputConfig::GuiInputConfig(InputConfig* target, | |||
|     // 0 is a spacer row.
 | ||||
|     mGrid.setEntry(std::make_shared<GuiComponent>(), glm::ivec2 {0, 0}, false); | ||||
| 
 | ||||
|     mTitle = std::make_shared<TextComponent>(_("CONFIGURING"), Font::get(FONT_SIZE_LARGE), | ||||
|                                              mMenuColorTitle, ALIGN_CENTER); | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         _("CONFIGURING"), Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), | ||||
|         mMenuColorTitle, ALIGN_CENTER); | ||||
|     mGrid.setEntry(mTitle, glm::ivec2 {0, 1}, false, true); | ||||
| 
 | ||||
|     std::stringstream ss; | ||||
|  |  | |||
|  | @ -114,8 +114,9 @@ GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup( | |||
|     addChild(&mBackground); | ||||
|     addChild(&mGrid); | ||||
| 
 | ||||
|     mTitle = std::make_shared<TextComponent>(title, Font::get(FONT_SIZE_LARGE), mMenuColorTitle, | ||||
|                                              ALIGN_CENTER); | ||||
|     mTitle = std::make_shared<TextComponent>( | ||||
|         title, Font::get(FONT_SIZE_LARGE * Utils::Localization::sMenuTitleScaleFactor), | ||||
|         mMenuColorTitle, ALIGN_CENTER); | ||||
| 
 | ||||
|     std::vector<std::vector<std::string>> kbLayout; | ||||
| 
 | ||||
|  |  | |||
|  | @ -150,7 +150,11 @@ namespace Utils | |||
| 
 | ||||
|             // Language-specific menu title scale factor.
 | ||||
|             if (localePair.first == "sv") | ||||
|                 sMenuTitleScaleFactor = 0.86f; | ||||
|                 sMenuTitleScaleFactor = 0.87f; | ||||
|             else if (localePair.first == "el") | ||||
|                 sMenuTitleScaleFactor = 0.92f; | ||||
|             else if (localePair.first == "zh") | ||||
|                 sMenuTitleScaleFactor = 0.94f; | ||||
| 
 | ||||
|             std::string localePath; | ||||
|             localePath.append("/") | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Leon Styhre
						Leon Styhre