-
-
Notifications
You must be signed in to change notification settings - Fork 115
User can see close focused project folder, alphabetize folders, and collapse folders. #657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b236248
263b57c
afda8bb
3d00e5e
bb658af
e619a89
fb06222
1e806bb
380167e
01c5d76
4fd73e2
c3a429d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,11 +40,32 @@ public class Code.Pane : Gtk.Grid { | |
| toolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_INLINE_TOOLBAR); | ||
| toolbar.icon_size = Gtk.IconSize.SMALL_TOOLBAR; | ||
|
|
||
| var add_button = new Gtk.ToolButton (new Gtk.Image.from_icon_name ("folder-open-symbolic", Gtk.IconSize.BUTTON), null); | ||
| add_button.action_name = Scratch.MainWindow.ACTION_PREFIX + Scratch.MainWindow.ACTION_OPEN_FOLDER; | ||
| add_button.tooltip_text = _("Add Project Folder…"); | ||
| var add_folder_button = new Gtk.ToolButton (new Gtk.Image.from_icon_name ("folder-open-symbolic", Gtk.IconSize.BUTTON), null); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lint: Long line
jeremypw marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| add_folder_button.action_name = Scratch.MainWindow.ACTION_PREFIX + Scratch.MainWindow.ACTION_OPEN_FOLDER; | ||
| add_folder_button.tooltip_text = _("Add Project Folder…"); | ||
|
|
||
| toolbar.add (add_button); | ||
| var project_more_button = new Gtk.MenuToolButton (null, null); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would expect a "open-menu" symbolic icon rather than the default down arrow which I associate with downloading or a combobox. A "hamburger" type icon would be nice but I am not sure that one is available.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was just using the default icon which I believe is used in other similar "dropdown" contexts, but I'd be fine to change to something else. I wanted to avoid using a settings-type icon because this is not necessarily settings, it's actions. |
||
| project_more_button.tooltip_text = _("Manage project folders…"); | ||
|
|
||
| var collapse_all_menu_item = new Gtk.MenuItem.with_label (_("Collapse All")); | ||
| collapse_all_menu_item.action_name = Scratch.MainWindow.ACTION_PREFIX + Scratch.MainWindow.ACTION_COLLAPSE_ALL_FOLDERS; | ||
|
|
||
| var order_projects_menu_item = new Gtk.MenuItem.with_label (_("Alphabetize")); | ||
| order_projects_menu_item.action_name = Scratch.MainWindow.ACTION_PREFIX + Scratch.MainWindow.ACTION_ORDER_FOLDERS; | ||
|
|
||
| var project_menu = new Gtk.Menu (); | ||
| project_menu.append (collapse_all_menu_item); | ||
| project_menu.append (order_projects_menu_item); | ||
| project_menu.show_all (); | ||
| project_more_button.set_menu (project_menu); | ||
|
|
||
| var separator_tool_item = new Gtk.SeparatorToolItem (); | ||
| separator_tool_item.set_expand (true); | ||
| separator_tool_item.draw = false; | ||
|
|
||
| toolbar.add (add_folder_button); | ||
| toolbar.add (separator_tool_item); | ||
| toolbar.add (project_more_button); | ||
|
|
||
| add (stack_switcher); | ||
| add (stack); | ||
|
|
@@ -88,4 +109,3 @@ public class Code.Pane : Gtk.Grid { | |
| }); | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we're setting this to a symbolic icon, but for some reason it's not rendering as symbolic… any idea what's up here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danrabbit mentioned this is due to the stylesheet, and not something within Code.