Skip to content

Commit d40cefe

Browse files
committed
Merge remote-tracking branch 'nanotech/f/restyle'
2 parents 8c6789a + f2e5ae9 commit d40cefe

File tree

5 files changed

+44
-56
lines changed

5 files changed

+44
-56
lines changed

Classes/Views/PBGitRevisionCell.m

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#import "NSColor+RGB.h"
1717

1818
const int COLUMN_WIDTH = 10;
19-
const BOOL ENABLE_SHADOW = YES;
19+
const BOOL ENABLE_SHADOW = NO;
2020
const BOOL SHUFFLE_COLORS = NO;
2121

2222
@implementation PBGitRevisionCell
@@ -36,7 +36,7 @@ + (NSArray *)laneColors
3636
float segment = 1.0f / colorCount;
3737
NSMutableArray *colors = [NSMutableArray new];
3838
for (size_t i = 0; i < colorCount; ++i) {
39-
NSColor *newColor = [NSColor colorWithCalibratedHue:(segment * i) saturation:0.9f brightness:0.9f alpha:1.0f];
39+
NSColor *newColor = [NSColor colorWithCalibratedHue:(segment * i) saturation:0.7f brightness:0.8f alpha:1.0f];
4040
[colors addObject:newColor];
4141
}
4242
if (SHUFFLE_COLORS) {
@@ -136,8 +136,9 @@ - (void) drawCircleInRect: (NSRect) r
136136
if (ENABLE_SHADOW && false) {
137137
[NSGraphicsContext restoreGraphicsState];
138138
}
139-
140-
NSRect smallOval = { columnOrigin.x - 4, columnOrigin.y + r.size.height * 0.5 - 4, 8, 8};
139+
140+
CGFloat outlineWidth = 1.4f;
141+
NSRect smallOval = CGRectInset(oval, outlineWidth, outlineWidth);
141142

142143
if ( [self isCurrentCommit ] ) {
143144
[[NSColor colorWithCalibratedRed: 0Xfc/256.0 green:0Xa6/256.0 blue: 0X4f/256.0 alpha: 1.0] set];
@@ -234,7 +235,7 @@ -(NSArray *)rectsForRefsinRect:(NSRect) rect;
234235
{
235236
NSMutableArray *array = [NSMutableArray array];
236237

237-
static const int ref_padding = 10;
238+
static const int ref_padding = 4;
238239
static const int ref_spacing = 4;
239240

240241
NSRect lastRect = rect;
@@ -246,7 +247,7 @@ -(NSArray *)rectsForRefsinRect:(NSRect) rect;
246247
NSSize textSize = [[ref shortName] sizeWithAttributes:attributes];
247248

248249
NSRect newRect = lastRect;
249-
newRect.size.width = textSize.width + ref_padding;
250+
newRect.size.width = textSize.width + ref_padding * 2;
250251
newRect.size.height = textSize.height;
251252
newRect.origin.y = rect.origin.y + (rect.size.height - newRect.size.height) / 2;
252253

@@ -266,7 +267,7 @@ - (void) drawLabelAtIndex:(int)index inRect:(NSRect)rect
266267
PBGitRef *ref = [refs objectAtIndex:index];
267268

268269
NSMutableDictionary* attributes = [self attributesForRefLabelSelected:[self isHighlighted]];
269-
NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:rect cornerRadius: 3.0];
270+
NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:rect cornerRadius:2];
270271
[[self colorForRef:ref] set];
271272

272273

html/css/diff.css

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
.diff .file {
2-
margin: 10px;
3-
padding: 10px;
4-
-webkit-border-radius: 10px;
2+
margin: 11px;
53
border: 1px solid #CCC;
6-
-webkit-box-shadow: 1px 1px 2px #DDD;
74
}
85

96
.diff .file .fileHeader {
10-
margin-top: -5px;
11-
padding-bottom: 1px;
7+
margin: 5px;
128
font-weight: bold;
139
}
1410

11+
.diff .file .fileHeader a {
12+
color: #000;
13+
text-decoration: none;
14+
}
15+
1516
.diff .file .diffContent {
1617
white-space: pre;
1718
font-family: Menlo, Monaco, monospace;
1819
}
1920

2021
.diff .file .diffcontent .lineno {
2122
float: left;
22-
padding-left: 2px;
23-
padding-right: 2px;
23+
padding-left: 3px;
24+
padding-right: 3px;
2425
background-color: #ECECEC;
2526
color: #A9A9A9;
26-
border: 1px solid #DDDDDD;
27+
border-right: 1px solid #DDDDDD;
2728
text-align: right;
2829
}
2930

@@ -36,6 +37,9 @@
3637
color: #bbb;
3738
}
3839

40+
.diff .file .diffContent .lines > div {
41+
padding-left: 2px;
42+
}
3943

4044
.diff .file .diffcontent .lines .delline {
4145
background-color: #FEE;
@@ -60,7 +64,7 @@
6064
}
6165
.diff .file .diffcontent .lines del,
6266
.diff .file .diffcontent .lines ins {
63-
text-decoration: none; border-radius: 0.3em;
67+
text-decoration: none; border-radius: 0.2em;
6468
}
6569
.diff .file .diffcontent .lines .delline del {
6670
background-color: #febfbf;

html/views/commit/commit.css

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,19 @@ table.diff {
6262
}
6363

6464
.diff .hunkbutton {
65-
min-width: 40px;
66-
padding: 0 2px 0 2px;
65+
min-width: 5em;
66+
padding: 3px 0;
67+
top: 4px;
6768
margin-bottom: 4px;
68-
margin-right: 1px;
69+
margin-right: 3px;
6970
float: right;
7071
position: relative;
7172
z-index: 1;
7273

73-
border: 1px solid #3465a4;
7474
background-color: #cce5ff;
7575
color: #204a87;
7676

7777
font-family: -apple-system, 'Helvetica Neue', 'Lucida Grande';
78-
font-size: 80%;
7978
text-decoration: none;
8079
text-align: center;
8180

@@ -96,12 +95,6 @@ table.diff {
9695
}
9796

9897
#selected #stagelines {
99-
padding-left: 2px;
100-
width: auto;
101-
padding-right: 2px;
102-
margin-right: 2px;
103-
margin-top: 1px;
104-
clear: right;
10598
background-color: #FFF;
10699
}
107100

html/views/commit/commit.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,7 @@ var showSelection = function(file, from, to, trust)
453453
var button = document.createElement('a');
454454
button.setAttribute("href","#");
455455
button.appendChild(document.createTextNode(
456-
(originalCached?"Uns":"S")+"tage line"+
457-
(elementList.length > 1?"s":"")));
456+
(originalCached?"Uns":"S")+"tage"));
458457
button.setAttribute("class","hunkbutton");
459458
button.setAttribute("id","stagelines");
460459
var copy_button = document.createElement('a');

html/views/history/history.css

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,11 @@ a {
127127
}
128128

129129
.refs {
130-
font-size: 9px;
130+
font-size: 10px;
131131
font-family: -apple-system, "Helvetica Neue", sans-serif;
132132
margin-right: 2px;
133-
padding: 1px 3px 1px 3px;
134-
-webkit-border-radius: 3px;
135-
-webkit-box-shadow: 1px 1px 2px #444;
133+
padding: 1px 4px;
134+
-webkit-border-radius: 2px;
136135
}
137136

138137
.refs.head {
@@ -158,12 +157,8 @@ a {
158157
padding: 10px;
159158
}
160159
#files {
161-
margin: 10px;
162-
padding: 10px 0;
163-
background-color: #f9f9f9;
164-
-webkit-border-radius: 10px;
165-
border: 1px solid #CCC;
166-
-webkit-box-shadow: 1px 1px 2px #DDD;
160+
margin: 10px 0;
161+
padding: 0;
167162
}
168163
#files ul {
169164
margin: 0;
@@ -176,13 +171,10 @@ a {
176171
height: 18px;
177172
}
178173
#files li.odd {
179-
background-color: #f9f9f9;
180-
}
181-
#files li.even {
182-
background-color: #f0f0f0;
174+
background-color: #f2f2f2;
183175
}
184176
#files li:hover {
185-
background-color: #d4e4ff;
177+
text-decoration: underline;
186178
cursor: pointer;
187179
}
188180
#files img.changetype-icon {
@@ -199,6 +191,7 @@ a {
199191

200192
.top-link {
201193
text-align: right;
194+
margin-top: -5px;
202195
margin-right: 20px;
203196
padding-bottom: 5px;
204197
font-size: 90%;
@@ -220,36 +213,34 @@ a {
220213
-webkit-box-shadow: 0 1px 1px #fff;
221214
}
222215
#files .changes-bar.added {
223-
background-color: #1a843d;
224-
border: 1px solid #164b27;
216+
background-color: #b2ffaf;
217+
border: 1px solid #080;
225218
}
226219
#files .changes-bar.removed {
227220
top: 10px;
228-
background-color: #ce2e2b;
229-
border: 1px solid #8c1815;
221+
background-color: #febfbf;
222+
border: 1px solid #B00;
230223
}
231224

232225
#files .diffstat-numbers {
233-
background-color: rgba(0,0,0,.75);
234-
color: #e3e3e3;
235226
font-size: 12px;
236227
font-weight: bold;
237-
text-shadow: #000 0 1px 1px;
238228
white-space: nowrap;
239229
padding: 1px 5px;
240230
position: absolute;
241-
height: 14px;
242-
border: 1px solid black;
243-
-webkit-box-shadow: 0 1px 1px white;
231+
height: 16px;
244232
}
245233

246234
#files .diffstat-numbers.summary {
235+
border-left: 1px solid #656565;
247236
-webkit-border-top-right-radius: 12px;
248237
-webkit-border-bottom-right-radius: 12px;
249-
right: 0px;
238+
right: 1px;
250239
width: 35px;
251240
}
252241
#files .diffstat-numbers.details {
242+
background-color: black;
243+
color: #e3e3e3;
253244
-webkit-border-top-left-radius: 12px;
254245
-webkit-border-bottom-left-radius: 12px;
255246
right: 46px;

0 commit comments

Comments
 (0)