2

I'm wondering if there is a way to increase the Panel size at the top of the screen. I installed 12.04 on my home theater PC, but the mouse isn't as precise as on my laptop.

I want to make it easier to use the Panel and easier to click the Minimize and Close buttons. I'm using Unity, but I'm not super adverse to switching UIs.

0

2 Answers 2

3

As far as I know... to change the size of the Panel in Unity you should edit the Source Code.

NOTE: In this example I'm running Ubuntu 12.04 with Unity 5.20.0

Download & Edit Unity Source Code.

1) Make sure you have enable the Source code repository

  • Open Ubuntu Software Center.
  • In the Menu Bar choose Edit -> Software Sources. Click to enable "Source code repository".
  • Just in case I use the "Main Server" to Download.

enter image description here

2) Open a Terminal and install the necessary packages.

  • sudo apt-get install build-essential

3) Install build dependencies.

  • sudo apt-get build-dep unity

4) Create a folder to download the source code.

  • mkdir ~/Downloads/src

  • cd ~/Downloads/src

5) Download the source code.

  • apt-get source unity

6) Edit the the files "PanelStyle.cpp" & "PanelIndicatorEntryView.cpp"

  • gedit unity-5.20.0/plugins/unityshell/src/PanelStyle.cpp

Search for the line "63" and change it.
eg:(In my case I changed it from 24 to 42)

enter image description here

Before:

: panel_height(24)

After:

: panel_height(42)

  • gedit unity-5.20.0/plugins/unityshell/src/PanelIndicatorEntryView.cpp

Search for the lines "208" & "215" and change them.
eg: (In my case I changed them from 22 to 24)

enter image description here

Before:

pixbuf = gtk_icon_theme_load_icon(theme, proxy_->image_data().c_str(), 22,

GtkIconInfo* info = gtk_icon_theme_lookup_by_gicon(theme, icon, 22,

After:

pixbuf = gtk_icon_theme_load_icon(theme, proxy_->image_data().c_str(), 24,

GtkIconInfo* info = gtk_icon_theme_lookup_by_gicon(theme, icon, 24,

7) Go to the "unity-5.20.0" folder to build the deb packages.

  • cd unity-5.20.0/
  • dpkg-buildpackage -rfakeroot -uc -b

8) Now you can install the deb packages.

  • cd ..

  • sudo dpkg -i *deb

9) increase the font size from 11 to 12.

  • gsettings set org.gnome.desktop.interface font-name 'Ubuntu 12'

10) Finally you can logout and Login or Restart to see the changes.

Before:

enter image description here

After:

enter image description here

enter image description here

Hope it helps.

1
  • If something goes bad, how do I revert to the original unity package? I don't know if I am ready to risk a fresh reinstall.
    – Gauthier
    Jun 13, 2014 at 8:55
2

Now with the correct answer I would like to complement this tutorial.
To achieve this effect in Unity 7.1.2 the process is much simpler

Open and edit with gedit the file

~/Downloads/src/unity-7.1.2+14.04.20140303/unity-shared/PanelStyle.cpp

Look for the section below:

40 Style* style_instance = nullptr;
41
42 DECLARE_LOGGER(logger, "unity.panel.style");
43 const int BUTTONS_SIZE = 16;
44 const int BUTTONS_PADDING = 1;
45 const int BASE_PANEL_HEIGHT = 22;

Change the value of BASE_PANEL_HEIGHT to greater or lesser according to your preference

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .