1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 18:04:43 +02:00

MDL-78884 theme: Update styles to display new icons properly

- The default box for the icons has been increased from 50px to 52px.
That way, on the course page, the box for the icons has changed from
30px to 32px.
- The icon size has been increased from 16px to 24px on the main course
page and from 24px to 40px on the activity page.
This commit is contained in:
Sara Arjona 2023-08-04 12:06:14 +02:00
parent 07736ae9b7
commit 4ab210a823
No known key found for this signature in database
8 changed files with 29 additions and 24 deletions
admin/tool/filetypes
mod/url
theme
boost
classic/style

@ -82,7 +82,9 @@ class tool_filetypes_renderer extends plugin_renderer_base {
// First cell has icon and extension.
$icon = $this->pix_icon('f/' . $filetype['icon'], '');
$row->cells[] = new html_table_cell($icon . ' ' . html_writer::span(s($extension)));
$iconcell = new html_table_cell($icon . ' ' . html_writer::span(s($extension)));
$iconcell->attributes['class'] = 'icon-size-5';
$row->cells[] = $iconcell;
// Reset URL and button if needed.
$reverturl = new \moodle_url('/admin/tool/filetypes/revert.php',

@ -245,8 +245,8 @@ function url_get_coursemodule_info($coursemodule) {
}
$info->customdata['display'] = $display;
// The icon will be filtered if it will be the default module icon.
$info->customdata['filtericon'] = empty($info->icon);
// The icon will be filtered from now on because the custom icons have been updated.
$info->customdata['filtericon'] = true;
return $info;
}

@ -168,7 +168,7 @@ class core_renderer extends \core_renderer {
];
$imagedata = html_writer::img($iconurl->out(false), '', $iconattrs);
$purposeclass = plugin_supports('mod', $this->page->activityname, FEATURE_MOD_PURPOSE);
$purposeclass .= ' activityiconcontainer';
$purposeclass .= ' activityiconcontainer icon-size-6';
$purposeclass .= ' modicon_' . $this->page->activityname;
$imagedata = html_writer::tag('div', $imagedata, ['class' => $purposeclass]);
if (!empty($USER->editing)) {

@ -155,8 +155,8 @@ $iconsizes: map-merge((
width: $activity-iconcontainer-width - 20px;
height: $activity-iconcontainer-width - 20px;
.activityicon {
width: $icon-width;
height: $icon-height;
width: $icon-medium-width;
height: $icon-medium-height;
}
}
}

@ -37,8 +37,8 @@ $primary-light-background: theme-color-level('primary', -12) !default;
$primary-light-border: theme-color-level('primary', -2) !default;
$primary-light-color: $body-color;
$primary-light-hover: theme-color-level('primary', -10) !default;
$activity-iconcontainer-height: 50px;
$activity-iconcontainer-width: 50px;
$activity-iconcontainer-height: 52px;
$activity-iconcontainer-width: 52px;
$activity-icon-administration-bg: #5d63f6 !default;
$activity-icon-assessment-bg: #eb66a2 !default;

@ -26166,8 +26166,8 @@ blockquote {
}
.activityiconcontainer {
width: 50px;
height: 50px;
width: 52px;
height: 52px;
display: inline-flex;
justify-content: center;
align-items: center;
@ -26182,16 +26182,16 @@ blockquote {
width: 24px;
}
.activityiconcontainer.small {
width: 40px;
height: 40px;
width: 42px;
height: 42px;
}
.activityiconcontainer.smaller {
width: 30px;
height: 30px;
width: 32px;
height: 32px;
}
.activityiconcontainer.smaller .activityicon {
width: 16px;
height: 16px;
width: 24px;
height: 24px;
}
.activityiconcontainer.administration {

@ -1,6 +1,9 @@
This file describes API changes in /theme/boost
information provided here is intended especially for theme designers.
=== 4.3 ===
* The $activity-iconcontainer-height and $activity-iconcontainer-width variables have been changed from 50px to 52px.
=== 4.0 ===
* Following the adopted standards, breadcrumbs have been removed for pages that reside on the 1st level within a course
e.g. participants, grades, settings, reports.

@ -26166,8 +26166,8 @@ blockquote {
}
.activityiconcontainer {
width: 50px;
height: 50px;
width: 52px;
height: 52px;
display: inline-flex;
justify-content: center;
align-items: center;
@ -26182,16 +26182,16 @@ blockquote {
width: 24px;
}
.activityiconcontainer.small {
width: 40px;
height: 40px;
width: 42px;
height: 42px;
}
.activityiconcontainer.smaller {
width: 30px;
height: 30px;
width: 32px;
height: 32px;
}
.activityiconcontainer.smaller .activityicon {
width: 16px;
height: 16px;
width: 24px;
height: 24px;
}
.activityiconcontainer.administration {