mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:12:44 +00:00 
			
		
		
		
	MouseSettings: Give this application a GUI facelift :^)
Note that the double-click "icon" adapts to the double-click speed and also reacts to double-clicks. :^)
This commit is contained in:
		
							parent
							
								
									3652ab8b2a
								
							
						
					
					
						commit
						81e6560009
					
				
					 10 changed files with 257 additions and 96 deletions
				
			
		|  | @ -1,6 +1,7 @@ | |||
| /*
 | ||||
|  * Copyright (c) 2020, Idan Horowitz <idan.horowitz@serenityos.org> | ||||
|  * Copyright (c) 2021, the SerenityOS developers. | ||||
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> | ||||
|  * | ||||
|  * SPDX-License-Identifier: BSD-2-Clause | ||||
|  */ | ||||
|  | @ -9,8 +10,6 @@ | |||
| #include <LibGUI/Action.h> | ||||
| #include <LibGUI/Application.h> | ||||
| #include <LibGUI/Icon.h> | ||||
| #include <LibGUI/Menu.h> | ||||
| #include <LibGUI/Menubar.h> | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| int main(int argc, char** argv) | ||||
|  | @ -31,22 +30,11 @@ int main(int argc, char** argv) | |||
| 
 | ||||
|     auto window = MouseSettingsWindow::construct(); | ||||
|     window->set_title("Mouse Settings"); | ||||
|     window->resize(300, 220); | ||||
|     window->resize(400, 480); | ||||
|     window->set_resizable(false); | ||||
|     window->set_minimizable(false); | ||||
|     window->set_icon(app_icon.bitmap_for_size(16)); | ||||
| 
 | ||||
|     auto menubar = GUI::Menubar::construct(); | ||||
|     auto& file_menu = menubar->add_menu("&File"); | ||||
|     file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { | ||||
|         app->quit(); | ||||
|     })); | ||||
| 
 | ||||
|     auto& help_menu = menubar->add_menu("&Help"); | ||||
|     help_menu.add_action(GUI::CommonActions::make_about_action("Mouse Settings", app_icon, window)); | ||||
| 
 | ||||
|     window->set_menubar(move(menubar)); | ||||
| 
 | ||||
|     window->show(); | ||||
|     return app->exec(); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling