Skip to content

Commit d3386aa

Browse files
committed
Now hiding views directly instead of using transparency
1 parent ddfa831 commit d3386aa

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

ICNS2ICO/MainWindowController.m

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ - ( void )awakeFromNib
8181
[ _iconView removeFromSuperview ];
8282
[ self.window.contentView addSubview: _iconView positioned: NSWindowBelow relativeTo: nil ];
8383

84-
_progressBar.alphaValue = ( CGFloat )0;
85-
_progressText.alphaValue = ( CGFloat )0;
86-
_mask.alphaValue = ( CGFloat )0;
84+
_progressBar.hidden = true;
85+
_progressText.hidden = true;
86+
_mask.hidden = true;
87+
_mask.alphaValue = ( CGFloat )0.9;
8788
_mask.backgroundColor = [ NSColor whiteColor ];
8889
_tableView.dataSource = self;
8990
_icoFormat = ICOFormatBMP;
@@ -286,9 +287,9 @@ - ( IBAction )convert: ( id )sender
286287
return;
287288
}
288289

289-
_progressBar.alphaValue = ( CGFloat )1;
290-
_progressText.alphaValue = ( CGFloat )1;
291-
_mask.alphaValue = ( CGFloat )0.9;
290+
_progressBar.hidden = false;
291+
_progressText.hidden = false;
292+
_mask.hidden = false;
292293

293294
[ _progressBar startAnimation: nil ];
294295
[ _progressBar setIndeterminate: NO ];
@@ -333,9 +334,9 @@ - ( IBAction )convert: ( id )sender
333334
{
334335
NSAlert * successAlert;
335336

336-
_progressBar.alphaValue = ( CGFloat )0;
337-
_progressText.alphaValue = ( CGFloat )0;
338-
_mask.alphaValue = ( CGFloat )0;
337+
_progressBar.hidden = true;
338+
_progressText.hidden = true;
339+
_mask.hidden = true;
339340

340341
[ _progressBar setIndeterminate: YES ];
341342
[ _progressBar stopAnimation: nil ];

0 commit comments

Comments
 (0)