Skip to content

Instantly share code, notes, and snippets.

@Azq2
Created March 17, 2023 01:36
Show Gist options
  • Select an option

  • Save Azq2/64b955be04f46363af9c54524c5c3213 to your computer and use it in GitHub Desktop.

Select an option

Save Azq2/64b955be04f46363af9c54524c5c3213 to your computer and use it in GitHub Desktop.
diff --git a/panel/PanelIndicatorsView.cpp b/panel/PanelIndicatorsView.cpp
index 8bf3c80..114fb12 100644
--- a/panel/PanelIndicatorsView.cpp
+++ b/panel/PanelIndicatorsView.cpp
@@ -46,7 +46,7 @@ PanelIndicatorsView::PanelIndicatorsView()
{
opacity.DisableNotifications();
layout_->SetContentDistribution(nux::MAJOR_POSITION_END);
- layout_->SetLeftAndRightPadding(layout_->GetLeftPadding(), 6);
+// layout_->SetLeftAndRightPadding(layout_->GetLeftPadding(), 6);
SetLayout(layout_);
LOG_DEBUG(logger) << "Indicators View Added: ";
diff --git a/panel/PanelIndicatorsView.h b/panel/PanelIndicatorsView.h
index 8e3a1ec..bb11df4 100644
--- a/panel/PanelIndicatorsView.h
+++ b/panel/PanelIndicatorsView.h
@@ -52,7 +52,7 @@ public:
typedef PanelIndicatorEntryView::IndicatorEntryType IndicatorEntryType;
PanelIndicatorEntryView* AddEntry(indicator::Entry::Ptr const& entry,
- int padding = 9,
+ int padding = 5,
IndicatorEntryPosition pos = AUTO,
IndicatorEntryType type = IndicatorEntryType::INDICATOR);
void RemoveEntry(indicator::Entry::Ptr const&);
diff --git a/panel/PanelMenuView.cpp b/panel/PanelMenuView.cpp
index abaa420..2bcdd49 100644
--- a/panel/PanelMenuView.cpp
+++ b/panel/PanelMenuView.cpp
@@ -45,8 +45,8 @@ DECLARE_LOGGER(logger, "unity.panel.menu");
namespace
{
- const RawPixel MAIN_LEFT_PADDING = 13_em;
- const RawPixel TITLE_PADDING = 1_em;
+ const RawPixel MAIN_LEFT_PADDING = 4_em;
+ const RawPixel TITLE_PADDING = 2_em;
const RawPixel MENUBAR_PADDING = 4_em;
const int MENU_ENTRIES_PADDING = 6;
diff --git a/panel/PanelTray.cpp b/panel/PanelTray.cpp
index afdf7d4..c4e7e39 100644
--- a/panel/PanelTray.cpp
+++ b/panel/PanelTray.cpp
@@ -29,7 +29,7 @@ DECLARE_LOGGER(logger, "unity.panel.tray");
namespace
{
const std::string SETTINGS_NAME = "com.canonical.Unity.Panel";
-const int PADDING = 12;
+const int PADDING = 3;
const std::array<std::string, 2> WHITELIST {{ "JavaEmbeddedFrame", "Wine" }};
}
diff --git a/unity-shared/PanelStyle.cpp b/unity-shared/PanelStyle.cpp
index 92d6751..e2fb22d 100644
--- a/unity-shared/PanelStyle.cpp
+++ b/unity-shared/PanelStyle.cpp
@@ -41,8 +41,8 @@ Style* style_instance = nullptr;
DECLARE_LOGGER(logger, "unity.panel.style");
const int BUTTONS_SIZE = 16;
-const int BUTTONS_PADDING = 9;
-const int BASE_PANEL_HEIGHT = 30;
+const int BUTTONS_PADDING = 1;
+const int BASE_PANEL_HEIGHT = 24;
const std::string PANEL_STYLE_CSS_NAME = "UnityPanelWidget";
inline std::string button_id(std::string const& prefix, double scale, WindowButtonType type, WindowState ws)
@Azq2
Copy link
Author

Azq2 commented May 10, 2023

  1. Get Unity source:
apt-get source unity
cd unity-7*
  1. Patch Unity:
# https://gist.github.com/Azq2/64b955be04f46363af9c54524c5c3213
wget "https://gist.githubusercontent.com/Azq2/64b955be04f46363af9c54524c5c3213/raw/326512fc1c9c06bc7e21108e92f0a0aaf1e1ad06/unity.patch" -O unity.patch
patch -p1 < unity.patch
  1. Install build deps:
sudo apt-get build-dep unity
  1. Start rebuilding:
# change parallell=8 with your cpu cores count
export DEB_BUILD_OPTIONS='parallel=8 nocheck'
fakeroot debian/rules binary
  1. Now install:
sudo dpkg -i ../unity_*.deb ../libunity-*deb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment