From 6d01d427e86b7c1632c673defdffa31c813d300e Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Tue, 24 Sep 2024 20:41:41 +0000 Subject: [PATCH] Switches all icons to Material Symbols (#23980). git-svn-id: https://svn.redmine.org/redmine/trunk@23077 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/assets/images/icons.svg | 365 +++++++++++------------- app/assets/stylesheets/application.css | 24 +- app/assets/stylesheets/context_menu.css | 8 +- app/helpers/icons_helper.rb | 4 +- app/helpers/projects_helper.rb | 4 +- app/views/context_menus/issues.html.erb | 2 +- app/views/issues/_action_menu.html.erb | 2 +- app/views/my/blocks/_timelog.html.erb | 2 +- app/views/projects/show.html.erb | 14 +- app/views/timelog/index.html.erb | 2 +- 10 files changed, 195 insertions(+), 232 deletions(-) diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index dadb68167..25c3e71f7 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -1,312 +1,267 @@ - - + + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - + + - + - + - + - - - - - - - + - - + + - - + + - - + + - - + + + - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - + + - + - - - - + - + - + - + - + - - + + - + - + - - - - - - - - - - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index c4ec58b29..0eb07d9cd 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -518,7 +518,6 @@ div.square { width: .6em; height: .6em; } .contextual {float:right; white-space: nowrap; line-height:1.4em;margin:5px 0px; padding-left: 10px; font-size:0.9em;} -.contextual .icon {padding-top: 2px; padding-bottom: 3px;} .contextual input, .contextual select {font-size:0.9em;} .message .contextual { margin-top: 0; } @@ -699,13 +698,12 @@ div.journal span.update-info {color: #666; font-size: 0.9em;} div#activity dl, #search-results { margin-left: 2em; } div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; } div#activity dt.me .time { border-bottom: 1px solid #999; } -div#activity dt .time { color: #777; font-size: 80%; } +div#activity dt .time { color: #777; font-size: 80%; margin-right: 4px; } div#activity dd .description, #search-results dd .description { font-style: italic; } div#activity span.project:after, #search-results span.project:after { content: " -"; } div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; } div#activity dt.grouped {margin-left:5em;} div#activity dd.grouped {margin-left:9em;} -div#activity dt.icon {background-position: 0 10px !important;} div#activity h3 { padding: 5px; background-color: #eeeeee; @@ -1621,7 +1619,7 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { position:relative; font-weight:bold; font-size: 10px; - bottom: 2px; + bottom: 4px; padding: 1px 3px; margin-right: 2px; margin-left: 2px; @@ -1666,8 +1664,9 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { } /***** SVG Icons *****/ -a.icon, a.icon-only { +.icon, .icon-only { display: inline-flex; + align-items: center; } a.icon svg, a.icon-only svg { @@ -1694,9 +1693,16 @@ svg.icon-ok { display: none; } -svg:not(div#gantt_draw_area svg, div.revision-graph svg) { - width: 0; - height: 0; +svg { + &.s20 { + width: 18px; + height: 18px; + } + + &.s18 { + width: 18px; + height: 18px; + } &.s14 { width: 14px; @@ -1710,7 +1716,7 @@ svg:not(div#gantt_draw_area svg, div.revision-graph svg) { } span.icon-label { - margin-left: 4px; + margin-left: 2px; } .icon-bookmarked-project svg { diff --git a/app/assets/stylesheets/context_menu.css b/app/assets/stylesheets/context_menu.css index ca25697f6..74de69cba 100644 --- a/app/assets/stylesheets/context_menu.css +++ b/app/assets/stylesheets/context_menu.css @@ -7,7 +7,6 @@ #context-menu { position: absolute; z-index: 40; font-size: 0.9em;} #context-menu ul, #context-menu li, #context-menu a { - display:block; margin:0; padding:0; border:0; @@ -27,6 +26,7 @@ padding:1px; z-index:39; border:1px solid white; + display: flex; } #context-menu li.folder ul { position:absolute; left:168px; /* IE6 */ top:-2px; max-height:300px; overflow:hidden; overflow-y: auto; } #context-menu li.folder>ul { left:148px; } @@ -42,13 +42,13 @@ #context-menu a { text-decoration:none !important; padding: 4px 8px; - width:100%; /* IE */ } -#context-menu li>a { width:auto; } /* others */ +#context-menu li>a { flex-grow: 1; } #context-menu a.disabled, #context-menu a.disabled:hover {color: #aaa;} -#context-menu li a.submenu { padding-right:16px; background:url("/arrow_right.png") right no-repeat; } +#context-menu li a.submenu { padding-right:16px; background:url("/arrow_right.png") right no-repeat; padding-left: 28px;} #context-menu li:hover { border:1px solid #628db6; background-color:#eef5fd; border-radius:3px; } #context-menu a:hover {color:#2A5685;} +#context-menu li.folder ul li a {padding-left: 20px;} #context-menu li.folder:hover { z-index:40; } #context-menu ul ul, #context-menu li:hover ul ul { display:none; } #context-menu li:hover ul, #context-menu li:hover li:hover ul { display:block; } diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index db4534da5..a29d42632 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -18,7 +18,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module IconsHelper - DEFAULT_ICON_SIZE = "14" + DEFAULT_ICON_SIZE = "18" DEFAULT_SPRITE = "icons" def icon_with_label(icon_name, label_text, icon_only: false, size: DEFAULT_ICON_SIZE, css_class: nil) @@ -42,7 +42,7 @@ module IconsHelper def icon_for_event_type(event_type, size: DEFAULT_ICON_SIZE, css_class: nil) icon = case event_type - when 'reply', 'issue-note' + when 'reply' 'comments' when 'time-entry' 'time' diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 070b0231a..2cd5aff61 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -185,12 +185,12 @@ module ProjectsHelper if bookmarked css << "icon-bookmark" - icon = "bookmark" + icon = "bookmark-delete" method = "delete" text = icon_with_label(icon, l(:button_project_bookmark_delete)) else css << "icon-bookmark-off" - icon = "bookmark-off" + icon = "bookmark-add" method = "post" text = icon_with_label(icon, l(:button_project_bookmark)) end diff --git a/app/views/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb index 9b9c7f07a..bb8f2add6 100644 --- a/app/views/context_menus/issues.html.erb +++ b/app/views/context_menus/issues.html.erb @@ -149,7 +149,7 @@ <% if @issue.present? %> <% if @can[:log_time] -%> -
  • <%= context_menu_link icon_with_label('time', l(:button_log_time)), new_issue_time_entry_path(@issue), +
  • <%= context_menu_link icon_with_label('time-add', l(:button_log_time)), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' %>
  • <% end %> <% if @can[:add_subtask] -%> diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index abb157d5a..14de05de8 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -2,7 +2,7 @@ <%= link_to icon_with_label('edit', l(:button_edit)), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'icon icon-edit ', :accesskey => accesskey(:edit) if @issue.editable? %> -<%= link_to icon_with_label('time', l(:button_log_time)), new_issue_time_entry_path(@issue), +<%= link_to icon_with_label('time-add', l(:button_log_time)), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add ' if User.current.allowed_to?(:log_time, @project) %> <%= watcher_link(@issue, User.current) %> <%= link_to icon_with_label('copy', l(:button_copy)), project_copy_issue_path(@project, @issue), diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index 95dc15e49..2ba53f4f8 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -5,7 +5,7 @@

    <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %> (<%= l(:label_last_n_days, days) %>: <%= l_hours_short entries.sum(&:hours) %>) - <%= link_to icon_with_label('add', l(:button_log_time)), new_time_entry_path, :class => "icon-only icon-add", :title => l(:button_log_time) if User.current.allowed_to?(:log_time, nil, :global => true) %> + <%= link_to icon_with_label('time-add', l(:button_log_time)), new_time_entry_path, :class => "icon-only icon-add", :title => l(:button_log_time) if User.current.allowed_to?(:log_time, nil, :global => true) %>

    diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index d54f36f0d..f8532ab91 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -134,12 +134,14 @@ <% if @subprojects.any? %>

    <%= icon_with_label('projects', l(:label_subproject_plural)) %>

    - -
    +
    + +
    + <% end %> <%= call_hook(:view_projects_show_right, :project => @project) %> diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb index 9259c97b6..ee7752a70 100644 --- a/app/views/timelog/index.html.erb +++ b/app/views/timelog/index.html.erb @@ -1,5 +1,5 @@
    -<%= link_to icon_with_label('time', l(:button_log_time)), +<%= link_to icon_with_label('time-add', l(:button_log_time)), _new_time_entry_path(@project, @query.filtered_issue_id), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %> <%= actions_dropdown do %> -- 2.39.5