@@ -39,6 +39,11 @@ public partial class MainForm : Form, IMessageFilter
39
39
private Boolean haveUpdates ;
40
40
private Boolean checkOnly ;
41
41
42
+ /**
43
+ * Static link label margin constant
44
+ */
45
+ public static Int32 LINK_MARGIN = 4 ;
46
+
42
47
/**
43
48
* Static type and state constants
44
49
*/
@@ -694,6 +699,7 @@ private void PopulateListView()
694
699
if ( this . appGroups . Count > 1 ) this . listView . ShowGroups = true ;
695
700
else this . listView . ShowGroups = false ;
696
701
this . UpdateEntryStates ( ) ;
702
+ this . UpdateLinkPositions ( ) ;
697
703
this . GenerateBundleLinks ( ) ;
698
704
this . listView . EndUpdate ( ) ;
699
705
}
@@ -703,6 +709,18 @@ private void PopulateListView()
703
709
}
704
710
}
705
711
712
+ /// <summary>
713
+ /// Update the link label positions for example if the font is different size.
714
+ /// </summary>
715
+ private void UpdateLinkPositions ( )
716
+ {
717
+ this . allLinkLabel . Location = new Point ( this . selectLabel . Bounds . Right + LINK_MARGIN , this . allLinkLabel . Location . Y ) ;
718
+ this . noneLinkLabel . Location = new Point ( this . allLinkLabel . Bounds . Right + LINK_MARGIN , this . allLinkLabel . Location . Y ) ;
719
+ this . newLinkLabel . Location = new Point ( this . noneLinkLabel . Bounds . Right + LINK_MARGIN , this . allLinkLabel . Location . Y ) ;
720
+ this . instLinkLabel . Location = new Point ( this . newLinkLabel . Bounds . Right + LINK_MARGIN , this . allLinkLabel . Location . Y ) ;
721
+ this . updateLinkLabel . Location = new Point ( this . instLinkLabel . Bounds . Right + LINK_MARGIN , this . allLinkLabel . Location . Y ) ;
722
+ }
723
+
706
724
/// <summary>
707
725
/// Generates the bundle selection links.
708
726
/// </summary>
@@ -719,7 +737,7 @@ private void GenerateBundleLinks()
719
737
LinkLabel linkLabel = new LinkLabel ( ) ;
720
738
linkLabel . Anchor = ( ( System . Windows . Forms . AnchorStyles ) ( ( System . Windows . Forms . AnchorStyles . Bottom | System . Windows . Forms . AnchorStyles . Left ) ) ) ;
721
739
linkLabel . LinkClicked += new LinkLabelLinkClickedEventHandler ( this . BundleLinkLabelLinkClicked ) ;
722
- linkLabel . Location = new Point ( prevLink . Bounds . Right + 5 , prevLink . Location . Y ) ;
740
+ linkLabel . Location = new Point ( prevLink . Bounds . Right + LINK_MARGIN , this . allLinkLabel . Location . Y ) ;
723
741
linkLabel . Links [ 0 ] . LinkData = bundle ;
724
742
linkLabel . LinkColor = Color . Green ;
725
743
linkLabel . AutoSize = true ;
0 commit comments