1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-14 03:15:49 +02:00

Work around broken bottom anchor in PluginControl

This commit is contained in:
chylex 2022-07-03 15:46:00 +02:00
parent a1b4c31450
commit 35c2ee3673
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548

View File

@ -40,6 +40,12 @@ public PluginControl(PluginManager pluginManager, Plugin plugin) : this() {
this.labelWebsite.Text = plugin.Website;
this.labelVersion.Text = plugin.Version;
// Bottom anchor seems to be broken, so the height of the label and border is set manually.
this.labelType.Anchor = AnchorStyles.Left | AnchorStyles.Top;
this.panelBorder.Anchor = AnchorStyles.Left | AnchorStyles.Top;
this.labelType.Height = Height;
this.panelBorder.Height = Height;
this.labelType.LineHeight = BrowserUtils.Scale(11, dpiScale);
UpdatePluginState();
@ -54,6 +60,8 @@ public PluginControl(PluginManager pluginManager, Plugin plugin) : this() {
private void timerLayout_Tick(object? sender, EventArgs e) {
timerLayout.Stop();
Height = nextHeight;
labelType.Height = nextHeight;
panelBorder.Height = nextHeight;
ResumeLayout();
}