Artik Posted March 22, 2019 Share Posted March 22, 2019 Hi! Starting to custom my own theme, I'm facing an issue that after browsing google and the forum I couldn't find a working solution. I simply want to reduce the font size of left listings. I managed to change the font style, but not the style. I understood that this listing is scaled automatically regarding the Windows screen settings, but there is no way to force it to be smaller? I spent a night without success, so here is my topic. I tried to edit ListBoxItemStyle.xaml, textlist, etc. But nothing to do. If it's not implemented yet, I really thing it's a feature you would consider, as it's something requested by many designers/skinners If there is a solution, I'm really looking for it, as it's my last setting needed to be changed to have a nice skin. thanks! Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted March 26, 2019 Share Posted March 26, 2019 The font settings (including size) are configurable in the LaunchBox options, so that is one thing to note. However, lots of themes have overridden this with custom fonts; I don't think there's anything preventing you from doing that. Maybe you can take a look at some of the other LaunchBox themes for an example? If you're still stuck, post some code here that isn't working and hopefully we can help. Quote Link to comment Share on other sites More sharing options...
Artik Posted March 26, 2019 Author Share Posted March 26, 2019 Hi Jason, thanks for reply. My topic concerns BigBox, sorry for missunderstanding Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted March 26, 2019 Share Posted March 26, 2019 56 minutes ago, Artik said: Hi Jason, thanks for reply. My topic concerns BigBox, sorry for missunderstanding Oic. Depending on the view, the font sizes are almost always set via the name of the TextBlock, or whatever element you're working with. So generally, if you change the name, then the font size will not be overridden. Quote Link to comment Share on other sites More sharing options...
Artik Posted March 26, 2019 Author Share Posted March 26, 2019 Ok, have to try it tomorrow. And I spent 4 hours without any luck last week Thanks to Faeran, he gave me the solution using this plugin: Now I can manage the size of the listing's font. Need to understand now how to change the FontFamily Quote Link to comment Share on other sites More sharing options...
Artik Posted March 28, 2019 Author Share Posted March 28, 2019 (edited) On 3/26/2019 at 8:49 PM, Jason Carr said: Oic. Depending on the view, the font sizes are almost always set via the name of the TextBlock, or whatever element you're working with. So generally, if you change the name, then the font size will not be overridden. Ok, I tried what you said, unfortunately, I still can't change any fontsize in the gamelist. I think I understood your suggestion. So I edited my TextGameView.xaml with these settings: <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300" HorizontalAlignment="Stretch" MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}" FocusVisualStyle="{x:Null}"> <Border Name="Border" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"> <DockPanel> <TextBlock Name="Favorite" DockPanel.Dock="Left" Visibility="{Binding FavoriteVisibility}" Foreground="#ff3434" FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/CityHunter 2/Fonts/FreeDesign001Bitbit.ttf#FreeDesign001Bitbit" FontSize="10" >★</TextBlock> <TextBlock Name="Title" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" HorizontalAlignment="Stretch" FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/CityHunter 2/Fonts/FreeDesign001Bitbit.ttf#FreeDesign001Bitbit" FontSize="10" Foreground="white" /> </DockPanel> </Border> </UserControl> As you can see, the custom fontfamily is working on my screenshot, but not the fontsize. I tried to change as you suggested the Name="Title" (thinking that all "Title" have the same fontsize. But the game list disappears. I tried also another Name that exists (maybe the fontsize will be smaller) so I tried Name="PlatformDetails" Listing disappears too. Honestly, if you find the way to get a custom font with customisable fontsize, it would be amazing. Hours spent to find the magic solution. Help will be really appreciated haha. Actual state of the skin's mod: Edited March 28, 2019 by Artik Quote Link to comment Share on other sites More sharing options...
Artik Posted April 10, 2019 Author Share Posted April 10, 2019 Little up @Jason . Honestly I really think we have a bug here, some fonts sizes are impossible to change (like the game listing) without using a plugin, and with plugin the fontfamily doesn't work, last step for me to finish the skin A fix is welcome, because your last commit with .tff linking is amazing! Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted April 10, 2019 Share Posted April 10, 2019 35 minutes ago, Artik said: Little up @Jason . Honestly I really think we have a bug here, some fonts sizes are impossible to change (like the game listing) without using a plugin, and with plugin the fontfamily doesn't work, last step for me to finish the skin A fix is welcome, because your last commit with .tff linking is amazing! Hi Artik, if you're still unable to set the font size after changing the name, then it's definitely a XAML/WPF issue, and rather than a bug, it's more likely just an issue with XAML priorities and such. I checked the code behind the TextGameView, and it only changes the font size from the backend if the names are "Title" and "Favorite". If you change those names, then it should allow you to change the font size without issues. However, it's also possible that the font size is being set via the parent ListView or ListBox, or something of that nature. Unfortunately I'm not home to experiment right now, but if there is a glitch, it would have to be with WPF or XAML, and I doubt WPF or XAML would have such a glaring glitch. Most likely there's something misleading that is overriding the font size. Also, make sure that the TextGameView is, in fact, the view that is being used in the area that you're trying to change. Quote Link to comment Share on other sites More sharing options...
wallmachine Posted April 11, 2019 Share Posted April 11, 2019 your not the only one Quote Link to comment Share on other sites More sharing options...
Artik Posted April 14, 2019 Author Share Posted April 14, 2019 On 4/10/2019 at 1:50 PM, Jason Carr said: Hi Artik, if you're still unable to set the font size after changing the name, then it's definitely a XAML/WPF issue, and rather than a bug, it's more likely just an issue with XAML priorities and such. I checked the code behind the TextGameView, and it only changes the font size from the backend if the names are "Title" and "Favorite". If you change those names, then it should allow you to change the font size without issues. However, it's also possible that the font size is being set via the parent ListView or ListBox, or something of that nature. Unfortunately I'm not home to experiment right now, but if there is a glitch, it would have to be with WPF or XAML, and I doubt WPF or XAML would have such a glaring glitch. Most likely there's something misleading that is overriding the font size. Also, make sure that the TextGameView is, in fact, the view that is being used in the area that you're trying to change. Well, I spent so many time that all you suggest has been already tried. If I change the name Title in <TextBlock Name="Title" > by anything else, I have an error. I also tried to look all parent files, and I can't find any file that could override the TextGameView.xaml (and yes, this is one of the 3 files I want to change the fontsize/family) Strange the a plugin exists to do it. Any help is really appeciated, would love to finish the skin and post it. @Jason can you try at home and let me know if you figured it out? Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted April 16, 2019 Share Posted April 16, 2019 On 4/14/2019 at 8:40 AM, Artik said: Well, I spent so many time that all you suggest has been already tried. If I change the name Title in <TextBlock Name="Title" > by anything else, I have an error. I also tried to look all parent files, and I can't find any file that could override the TextGameView.xaml (and yes, this is one of the 3 files I want to change the fontsize/family) Strange the a plugin exists to do it. Any help is really appeciated, would love to finish the skin and post it. @Jason can you try at home and let me know if you figured it out? Ah, okay. So the issue is that you can't change the name of the text box without getting an error? What is the error that you're getting? Quote Link to comment Share on other sites More sharing options...
Artik Posted April 18, 2019 Author Share Posted April 18, 2019 On 4/16/2019 at 8:06 PM, Jason Carr said: Ah, okay. So the issue is that you can't change the name of the text box without getting an error? What is the error that you're getting? Damn, the error was because I made a mistake with double TextBlock with same name. So I tried to rename as "test". Nothing appears: Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted April 18, 2019 Share Posted April 18, 2019 Ah, I see. Try adding a Text property binding like this: <TextBlock Name="Test" Text="{Binding Name}" /> Quote Link to comment Share on other sites More sharing options...
Artik Posted April 18, 2019 Author Share Posted April 18, 2019 (edited) 2 hours ago, Jason Carr said: Ah, I see. Try adding a Text property binding like this: <TextBlock Name="Test" Text="{Binding Name}" /> Solution found!!! TextGameView.xaml (for the games listing) : <TextBlock Name="GamesListing" Text="{Binding Path=Title}" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" HorizontalAlignment="Stretch" FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/Arcadust/Fonts/FreeDesign001Bitbit.ttf#FreeDesign001Bitbit" FontSize="20" Foreground="white" /> FilterView.xaml (for the categories listing) : <TextBlock Name="CategoriesListing" Text="{Binding Path=Name}" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" HorizontalAlignment="Stretch" FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/Arcadust/Fonts/FreeDesign001Bitbit.ttf#FreeDesign001Bitbit" FontSize="20" Foreground="white" /> MenuItemView.xaml (for the settings listing) : <TextBlock Name="MenuItems" Text="{Binding Path=Text}" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" HorizontalAlignment="Stretch" FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/Arcadust/Fonts/FreeDesign001Bitbit.ttf#FreeDesign001Bitbit" FontSize="20" Foreground="white" /> Many thanks @Jason a big big step! Edited April 19, 2019 by Artik 1 Quote Link to comment Share on other sites More sharing options...
Artik Posted April 19, 2019 Author Share Posted April 19, 2019 Oops, any help ? It seems the checkboxes resize the text. Where can I set/change this to fix it ? Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted April 22, 2019 Share Posted April 22, 2019 It would be in the OptionsCheckBoxMenuItemView.xaml file. If you put the CheckBox inside a grid or a panel of some sort, that should stop it from changing the font size. Quote Link to comment Share on other sites More sharing options...
Artik Posted April 22, 2019 Author Share Posted April 22, 2019 3 hours ago, Jason Carr said: It would be in the OptionsCheckBoxMenuItemView.xaml file. If you put the CheckBox inside a grid or a panel of some sort, that should stop it from changing the font size. All fixed ! 1 Quote Link to comment Share on other sites More sharing options...
Artik Posted April 25, 2019 Author Share Posted April 25, 2019 I continue this topic if I'm facing little issue to avoid creating a new topic. Do you know if on the categorie listing (here I have 4 catégories) To add the number of games icluded in each one of them ? I know we have this number (displayed down right) but how to include it after the category's name ? I tried to edit the FilterView.xml, but I always have an error . How can I do it ? <TextBlock Name="CategoriesListing" Text="{Binding Path=Name} (253)" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap" HorizontalAlignment="Stretch" FontFamily="LAUNCHBOX_ROOT_FOLDER/Themes/Arcadust/Fonts/FreeDesign001Bitbit.ttf#FreeDesign001Bitbit" FontSize="20" Foreground="white" /> Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted April 25, 2019 Share Posted April 25, 2019 There's not really a recommended or easy way to do that as it may cause performance issues to load all the counts up at once. They are cached, but not in every single situation. You might need a plugin in order to pull it off. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.