Ubuntu – Increase Panel size

customizationpanelunity

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.

Best Answer

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.