@@ -40,9 +40,6 @@ class LocksControl
4040 [ NonSerialized ] private GitLockEntry rightClickNextRenderEntry ;
4141 [ NonSerialized ] private int controlId ;
4242
43- private const string FilePathFormatString = "Path: {0}" ;
44- private const string UserNameFormatString = "User: {0}" ;
45-
4643 public int SelectedIndex
4744 {
4845 get { return selectedIndex ; }
@@ -107,17 +104,21 @@ private void RenderEntry(Rect entryRect, GitLockEntry entry, int index)
107104 {
108105 var isSelected = index == SelectedIndex ;
109106
110- var iconRect = new Rect ( entryRect . x , entryRect . y + Styles . BaseSpacing / 2 , 32 , 32 ) ;
111- var pathRect = new Rect ( entryRect . x + 32 , entryRect . y + Styles . BaseSpacing / 2 , entryRect . width , Styles . LocksSummaryHeight + Styles . BaseSpacing ) ;
112- var lastY = pathRect . y + pathRect . height ;
113- var userRect = new Rect ( entryRect . x + 32 , lastY + Styles . BaseSpacing / 2 , entryRect . width , Styles . LocksUserHeight + Styles . BaseSpacing ) ;
107+ var iconRect = new Rect ( entryRect . x + Styles . BaseSpacing / 2 , entryRect . y + ( Styles . LocksEntryHeight - 32 ) / 2 , 32 + Styles . BaseSpacing , 32 ) ;
108+
109+ var xIconRectRightSidePadded = iconRect . x + iconRect . width ;
110+
111+ var pathRect = new Rect ( xIconRectRightSidePadded , entryRect . y + Styles . BaseSpacing / 2 , entryRect . width , Styles . LocksSummaryHeight + Styles . BaseSpacing ) ;
112+ var userRect = new Rect ( xIconRectRightSidePadded , pathRect . y + pathRect . height + Styles . BaseSpacing / 2 , entryRect . width , Styles . LocksUserHeight + Styles . BaseSpacing ) ;
113+ var dateRect = new Rect ( xIconRectRightSidePadded , userRect . y + userRect . height + Styles . BaseSpacing / 2 , entryRect . width , Styles . LocksDateHeight + Styles . BaseSpacing ) ;
114114
115- var hasKeyboardFocus = GUIUtility . keyboardControl == controlId ;
115+ var hasKeyboardFocus = GUIUtility . keyboardControl == controlId ;
116116
117117 Styles . Label . Draw ( entryRect , GUIContent . none , false , false , isSelected , hasKeyboardFocus ) ;
118118 Styles . Label . Draw ( iconRect , entry . Content , false , false , isSelected , hasKeyboardFocus ) ;
119- Styles . Label . Draw ( pathRect , string . Format ( FilePathFormatString , entry . GitLock . Path ) , false , false , isSelected , hasKeyboardFocus ) ;
120- Styles . Label . Draw ( userRect , string . Format ( UserNameFormatString , entry . GitLock . User ) , false , false , isSelected , hasKeyboardFocus ) ;
119+ Styles . Label . Draw ( pathRect , entry . GitLock . Path , false , false , isSelected , hasKeyboardFocus ) ;
120+ Styles . Label . Draw ( userRect , entry . GitLock . User , false , false , isSelected , hasKeyboardFocus ) ;
121+ Styles . Label . Draw ( dateRect , DateTimeOffset . Now . ToString ( ) , false , false , isSelected , hasKeyboardFocus ) ;
121122 }
122123
123124 private bool HandleInput ( Rect rect , GitLockEntry entry , int index , Action < GitLock > singleClick = null ,
0 commit comments