Skip to content
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

Panel icon size up to 128px #11690

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions files/usr/share/cinnamon/cinnamon-settings/modules/cs_panel.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/python3


import sys
import json
import gi
Expand Down Expand Up @@ -60,7 +61,7 @@ def can_show(vlist, possible):
section = SettingsSection(_("Customize"))
self.add(section)

widget = PanelRange(dimension_text, "org.cinnamon", "panels-height", self.panel_id, _("Smaller"), _("Larger"), mini=20, maxi=60, show_value=True)
widget = PanelRange(dimension_text, "org.cinnamon", "panels-height", self.panel_id, _("Smaller"), _("Larger"), mini=20, maxi=130, show_value=True)
widget.set_rounding(0)
section.add_row(widget)

Expand Down Expand Up @@ -127,7 +128,14 @@ def create_zone_page(self, zone):
[22, '22px'],
[24, '24px'],
[32, '32px'],
[48, '48px']
[40, '40px'],
[48, '48px'],
[56, '56px'],
[64, '64px'],
[72, '72px'],
[80, '80px'],
[96, '96px'],
[128, '128px']
]

widget = PanelJSONComboBox(_("Colored icon size"),
Expand All @@ -137,7 +145,7 @@ def create_zone_page(self, zone):

widget = PanelJSONSpinButton(_("Symbolic icon size"),
"org.cinnamon", "panel-zone-symbolic-icon-sizes",
self.panel_id, zone, _("px"), 10, 50, 1, 0)
self.panel_id, zone, _("px"), 10, 128, 1, 0)
zone_page.pack_start(widget, False, False, 0)

return zone_page
Expand Down
18 changes: 13 additions & 5 deletions js/ui/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const APPLETS_DROP_ANIMATION_TIME = 0.2;
const PANEL_PEEK_TIME = 1500;

const EDIT_MODE_MIN_BOX_SIZE = 25;
const VALID_ICON_SIZE_VALUES = [-1, 0, 16, 22, 24, 32, 48];
const VALID_ICON_SIZE_VALUES = [-1, 0, 16, 22, 24, 32, 48, 64, 72, 80, 96, 128];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you missing additional sizes here? (40, 56)


/*** These are defaults for a new panel added */
const DEFAULT_PANEL_VALUES = {"panels-autohide": "false",
Expand All @@ -58,13 +58,13 @@ const DEFAULT_SYMBOLIC_ICON_SIZE_VALUES = {"left": 28,
"center": 28,
"right": 28};
const MIN_SYMBOLIC_SIZE_PX = 10;
const MAX_SYMBOLIC_SIZE_PX = 50;
const MAX_SYMBOLIC_SIZE_PX = 130;

const DEFAULT_TEXT_SIZE_VALUES = {"left": 0.0,
"center": 0.0,
"right": 0.0};
const MIN_TEXT_SIZE_PTS = 6.0;
const MAX_TEXT_SIZE_PTS = 16.0;
const MAX_TEXT_SIZE_PTS = 24.0;
/*** Defaults ***/

const PANEL_AUTOHIDE_KEY = "panels-autohide";
Expand Down Expand Up @@ -254,8 +254,16 @@ function toStandardIconSize(maxSize) {
if (maxSize < 22) return 16;
else if (maxSize < 24) return 22;
else if (maxSize < 32) return 24;
else if (maxSize < 48) return 32;
// Panel icons reach 32 at most with the largest panel, also on hidpi
else if (maxSize < 40) return 32;
else if (maxSize < 48) return 40;
else if (maxSize < 56) return 48;
else if (maxSize < 64) return 56;
else if (maxSize < 72) return 64;
else if (maxSize < 80) return 72;
else if (maxSize < 96) return 80;
else if (maxSize < 128) return 96;
else if (maxSize < 160) return 128;
// Panel icons reach 128 at most with the largest panel, also on hidpi
return 48;
}

Expand Down