@@ -90,7 +90,9 @@ class Styles
90
90
hyperlinkStyle ,
91
91
selectedArea ,
92
92
selectedLabel ,
93
- progressAreaBackStyle ;
93
+ progressAreaBackStyle ,
94
+ labelNoWrap ,
95
+ invisibleLabel ;
94
96
95
97
private static Texture2D branchIcon ,
96
98
activeBranchIcon ,
@@ -243,6 +245,46 @@ public static GUIStyle Label
243
245
}
244
246
}
245
247
248
+ public static GUIStyle LabelNoWrap
249
+ {
250
+ get
251
+ {
252
+ if ( labelNoWrap == null )
253
+ {
254
+ labelNoWrap = new GUIStyle ( GUI . skin . label ) ;
255
+ labelNoWrap . name = "LabelNoWrap" ;
256
+
257
+ var hierarchyStyle = GUI . skin . FindStyle ( "PR Label" ) ;
258
+ labelNoWrap . onNormal . background = hierarchyStyle . onNormal . background ;
259
+ labelNoWrap . onNormal . textColor = hierarchyStyle . onNormal . textColor ;
260
+ labelNoWrap . onFocused . background = hierarchyStyle . onFocused . background ;
261
+ labelNoWrap . onFocused . textColor = hierarchyStyle . onFocused . textColor ;
262
+ labelNoWrap . wordWrap = false ;
263
+ }
264
+ return labelNoWrap ;
265
+ }
266
+ }
267
+
268
+ public static GUIStyle InvisibleLabel
269
+ {
270
+ get
271
+ {
272
+ if ( invisibleLabel == null )
273
+ {
274
+ invisibleLabel = new GUIStyle ( GUI . skin . label ) ;
275
+ invisibleLabel . name = "InvisibleLabel" ;
276
+
277
+ var hierarchyStyle = GUI . skin . FindStyle ( "PR Label" ) ;
278
+ invisibleLabel . onNormal . background = hierarchyStyle . onNormal . background ;
279
+ invisibleLabel . onNormal . textColor = new Color ( 255 , 0 , 0 , 0 ) ;
280
+ invisibleLabel . onFocused . background = hierarchyStyle . onFocused . background ;
281
+ invisibleLabel . onFocused . textColor = new Color ( 255 , 0 , 0 , 0 ) ;
282
+ invisibleLabel . wordWrap = true ;
283
+ }
284
+ return invisibleLabel ;
285
+ }
286
+ }
287
+
246
288
public static GUIStyle SelectedLabel
247
289
{
248
290
get
@@ -475,7 +517,7 @@ public static GUIStyle HistoryEntrySummaryStyle
475
517
{
476
518
if ( historyEntrySummaryStyle == null )
477
519
{
478
- historyEntrySummaryStyle = new GUIStyle ( Label ) ;
520
+ historyEntrySummaryStyle = new GUIStyle ( LabelNoWrap ) ;
479
521
historyEntrySummaryStyle . name = "HistoryEntrySummaryStyle" ;
480
522
481
523
historyEntrySummaryStyle . contentOffset = new Vector2 ( BaseSpacing * 2 , 0 ) ;
0 commit comments