Toolbar icon/text setting implemented

This commit is contained in:
anthony 2021-04-08 20:47:23 +01:00
parent 3f181a1a84
commit 32bef062dd
8 changed files with 19 additions and 2 deletions

View File

@ -19,6 +19,7 @@ struct browser_window;
enum gui_pointer_shape lastRequestedPointer;
id searchBar;
id searchImage;
id searchLabel;
NSMutableArray *tabs;
BOOL isClosing;
id activeTab;

View File

@ -97,6 +97,7 @@ static id newTabTarget;
object: nil];
urlSuggestionView = [[UrlSuggestionView alloc] initForUrlBar: urlBar
inBrowserWindowController: self];
[self reconfigureUrlBarButtons];
NSLog(@"Browser window loaded");
}
@ -537,12 +538,26 @@ static id newTabTarget;
-(void)reconfigureUrlBarButtons {
NSLog(@"reconfigure url bar buttons");
UrlBarButtonType buttonType = [[Preferences defaultPreferences] urlBarButtonType];
NSLog(@"type: %d", buttonType);
switch (buttonType) {
case UrlBarButtonTypeImage:
[backButton setTitle: nil];
[backButton setImage: [NSImage imageNamed: @"back"]];
[forwardButton setTitle: nil];
[forwardButton setImage: [NSImage imageNamed: @"forward"]];
[refreshButton setTitle: nil];
[refreshButton setImage: [NSImage imageNamed: @"refresh"]];
[searchImage setImage: [NSImage imageNamed: @"search"]];
[searchLabel setStringValue: nil];
break;
case UrlBarButtonTypeText:
[backButton setTitle: @"Back"];
[backButton setImage: nil];
[forwardButton setTitle: @"Forward"];
[forwardButton setImage: nil];
[refreshButton setTitle: @"Refresh"];
[refreshButton setImage: nil];
[searchImage setImage: nil];
[searchLabel setStringValue: @"Search:"];
break;
default:
break;

View File

@ -18,7 +18,8 @@
refreshButton,
searchImage,
searchBar,
tabView
tabView,
searchLabel
);
Super = NSWindowController;
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 755 B

After

Width:  |  Height:  |  Size: 213 B