Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons out of view in build-in UI #123

Open
MarcBuss24 opened this issue Aug 13, 2020 · 10 comments
Open

Buttons out of view in build-in UI #123

MarcBuss24 opened this issue Aug 13, 2020 · 10 comments

Comments

@MarcBuss24
Copy link

I am trying to make an updater with the build-in UI WinForms/NetCore but some buttons are not showing properly on the window. I know that this issue has already been asked before but there was no answer so I was wondering if someone found what the problem is. By pulling the sample project, I get the same thing.
Capture

@Deadpikle Deadpikle added the bug label Aug 23, 2020
@Deadpikle
Copy link
Collaborator

Hi @Marc022!

First, apologies for not only a slow reply but also the lack of a reply in the first place to at least acknowledge the issue. I'm so busy right now, and I'm not a WinForms expert, so this is difficult for me. I'm learning slowly, though, and I am hoping this is fixed in 2.0.0-preview20200823001! Please test it out. If the issue persists, please re-open this bug and give me more info on your test system if you can. Things like operating system version, DPI, monitor scaling, and other things would be really helpful to me, as I could not replicate this issue locally and had to guess as to what could fix it.

@Deadpikle Deadpikle added this to the 2.0.0 milestone Aug 23, 2020
@WaseemAlkurdi
Copy link

WaseemAlkurdi commented Mar 21, 2021

@Deadpikle

Hello!

I've had this issue with the latest version of NetSparkle as of today ...
I'm developing a C# program inside a VirtualBox VM, and so far, everything has been working fine, until I maximized the virtual machine's window, which causes the screen resolution to dynamically change to the size of the host's screen. I resized it back to its original size ... and now for some reason the updater dialog buttons are almost gone!

I rebooted the virtual machine, and now a tiny fraction of the buttons does show up. I think that this is an anchor issue.

That virtual machine is running Windows 7, and DPI settings are set to defaults (96 DPI and 100% scaling).

Also note the weird gap between the end of the text (black box ends where text ends) and "is now available" ... why would that be?

Attached is a screenshot:
Screenshot

(Also same issue as in: #44)

@Deadpikle
Copy link
Collaborator

Deadpikle commented Mar 21, 2021

@WaseemAlkurdi

Thanks for the report. Which UI? Is this WinForms .NET Core or .NET Framework? Or WPF?

If someone can make a reproducible sample for this DPI issue, I would love to have it. I can't repro this issue, which makes it very hard to fix. That table row on the form has a height of AutoSize, so.......😵

RE: The whitespace -- does your app cast program name or version # have a bunch of whitespace or something? (You can anonymize and paste the app cast here; that might help.) This is the code that generates that text:

lblInfoText.Text = string.Format("{0} {3} is now available (you have {1}). Would you like to {2} it now?", item.AppName, versionString, downloadInstallText, item.Version);

@WaseemAlkurdi
Copy link

WaseemAlkurdi commented Mar 22, 2021

@Deadpikle

This is the .NET Framework UI version (2.0.0-preview20210314001), and I'm running Visual Studio 2013 and .NET Framework 4.5.2 on Windows 7. Both the system language and locale are English (US), so it's definitely not a localization issue.

I did nothing special apart from merely importing and using NetSparkle, except maybe that I'm using a custom icon (can't get it to disregard the "icon" parameter, so I had to specify my app's icon). It's almost certainly not that, since the buttons used to work alright even with the custom icon.

I will try to reinstall Windows 7 and VS2013 on a clean VM later today to see if I can do anything specific to "trigger" this.

As for the whitespace, you're right! It's indeed the issue. Looking in the generated appcast, I see that it automatically inserted a bunch of spaces after the version!
This is my appcast:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
<channel>
<title>REMOVED</title>
<language>en</language>
<item>
<title>REMOVED 1.1                                               </title>
<pubDate>Sat, 20 Mar 2021 02:07:54 +02:00</pubDate>
<enclosure url="http://xxx.yyy.zz.a/REMOVED.exe" sparkle:version="1.1                                               " sparkle:shortVersionString="1" length="REMOVED" sparkle:os="windows" type="application/octet-stream" sparkle:signature="REMOVED" />
</item>
</channel>
</rss>

@Deadpikle
Copy link
Collaborator

Thanks for the additional info. Definitely not the icon. Should be able to avoid the icon param though:

public UIFactory()
{
HideReleaseNotes = false;
HideRemindMeLaterButton = false;
HideSkipButton = false;
}

Whitespace: Bah, probably need to be trimming titles and stuff. (itemTitle in the following code is what is getting extra whitespace):

if (opts.FileExtractVersion)
{
version = GetVersionFromName(fileInfo);
}
else
{
version = GetVersionFromAssembly(fileInfo);
}
if (version == null)
{
Console.WriteLine($"Unable to determine version of binary {fileInfo.Name}, try -f parameter");
Environment.Exit(1);
}
var productVersion = version;
var itemTitle = string.IsNullOrWhiteSpace(productName) ? productVersion : productName + " " + productVersion;

@Deadpikle Deadpikle modified the milestones: 2.0.0, 2.1+ Apr 18, 2021
Deadpikle added a commit that referenced this issue Apr 19, 2021
@Deadpikle
Copy link
Collaborator

@WaseemAlkurdi

The trimming issues with whitespace have been resolved in the most recent version of the AppCastGenerator tool (2.0.3+).

@SeanAWalsh
Copy link

Do you still have the invisible button problem?

@Deadpikle
Copy link
Collaborator

Do you still have the invisible button problem?

I haven't been able to replicate it. I'm waiting on @WaseemAlkurdi to reply to see if they can still replicate it.

@Deadpikle
Copy link
Collaborator

Could it be that the TableLayoutPanel needs to use Dock.Fill rather than anchoring to Top, Bottom, Left, Right?? 🤔

@SeanAWalsh
Copy link

I'll try out the new version with my dodgy user and report back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants