[SOLVED] UI becomes small on smaller devices (EasyTabs)

Hello,
My user-interface changes size dramatically and easy tabs just plays up big time. I don't really know how to describe it so I've attached a picture of it.

weird.png 63.5KB, 1 download(s) since 2018-02-06 

   You don't have the permssion to download the attachments of this post.
A post by brwck

Like 0 Dislike

That might just be a Windows thing, since it usually scales-up the UI on smaller devices: https://blogs.technet.microsoft.com/ask … indows-10/

Not much you can do really, usually it's up to the user to play around with the scaling settings to make the UI larger. To fix the weird text size you can keep it nominal with the rest of the UI by going to the "BaseTabRenderer.cs" file and changing the following in the "Render" void (around line number 721):

graphicsContext.DrawString(
					tab.Caption, SystemFonts.CaptionFont, Brushes.Black,
					new Rectangle(
						area.X + OverlapWidth + CaptionMarginLeft + (tab.Content.ShowIcon
							? IconMarginLeft +
							  16 +
							  IconMarginRight
							: 0),
						CaptionMarginTop + area.Y,
						_tabContentWidth - (tab.Content.ShowIcon
							? IconMarginLeft + 16 + IconMarginRight
							: 0) - (tab.ShowCloseButton
								? _closeButtonImage.Width +
								  CloseButtonMarginRight +
								  CloseButtonMarginLeft
								: 0), tab.TabImage.Height),
					new StringFormat(StringFormatFlags.NoWrap)
					{
						Trimming = StringTrimming.EllipsisCharacter
});

To something like this:

Font captionFont = new Font("Open Sans", 12, FontStyle.Regular, GraphicsUnit.Pixel);

graphicsContext.DrawString(
					tab.Caption, captionFont, Brushes.Black,
					new Rectangle(
						area.X + OverlapWidth + CaptionMarginLeft + (tab.Content.ShowIcon
							? IconMarginLeft +
							  16 +
							  IconMarginRight
							: 0),
						CaptionMarginTop + area.Y,
						_tabContentWidth - (tab.Content.ShowIcon
							? IconMarginLeft + 16 + IconMarginRight
							: 0) - (tab.ShowCloseButton
								? _closeButtonImage.Width +
								  CloseButtonMarginRight +
								  CloseButtonMarginLeft
								: 0), tab.TabImage.Height),
					new StringFormat(StringFormatFlags.NoWrap)
					{
						Trimming = StringTrimming.EllipsisCharacter
});

Hope this helps! 1f609

Like 0 Dislike