Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1261  / 3 Years ago, thu, september 9, 2021, 3:26:45

I'm using Ubuntu 13.04 Raring Ringtail with the Malys-uniblack icon theme (The icons are black).

Also I'm using a theme called Mediterraneanlight. I think it looks very nice.



I have the launcher color set to a light grey color/almost white and so the
dash follows suit and has the window background set as the same color.



I have it set this way so that the icons themselves show up nice and bold. However, this creates the problem of me not being able to read the text that is displayed below the icons because it blends in with the light background color.



How do I change the text color of items displayed in the Unity Dash?.



Thank you for your time and let me know if you need any more information other than what I've already provided.



Thanks.


More From » unity

 Answers
3

The text-color "white" for the "Results in the Unity Dash below the icons" is hardcoded in the Unity source. You can try to edit the source code to change that color.




NOTE: I recommend you to do this in a Virtual Machine or in a Test Machine to see is everything is OK.
In this example I'm running Ubuntu 13.04 with unity 7.0.0 and I only will change the text-color (Below the icons) from White to Black.




1) Make sure you have enable the Source code repository.



  • Open the 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


Open a Terminal window Ctrl+Alt+T and type:



  • sudo apt-get update


2) In the Terminal type the following to install the necessary packages.



  • sudo apt-get install build-essential python-windowmocker quilt


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 & Export variables.



  • apt-get source unity



  • export QUILT_PATCHES=debian/patches



  • export EDITOR=gedit




6) Create the patch and Edit the source code.



  • cd unity-7.0.0daily13.06.19~13.04/



  • quilt new 99-custon-color-dash.patch



  • quilt edit dash/ResultRendererTile.cpp






Edit the Line 438.


enter image description here


I changed it from:


  cairo_set_source_rgba(cr, 1.0f, 1.0f, 1.0f, 1.0f);

To:


  cairo_set_source_rgba(cr, 0.0f, 0.0f, 0.0f, 1.0f);

Save the changes in gedit.




Brief explanation


The code uses cairo with Arithmetic notation to set the color.


Arithmetic notation:

From 0 to 1, with any fractional value in between. This representation is used in theoretical analyses, and in systems that use floating point representations.


Digital 8-bit per channel notation:

(Red,Green,Blue) (0 to 255, 0 to 255, 0 to 255)


You can choose your color with the typical RGB color selector in graphic software, like Red:


enter image description here


(Red,Green,Blue) (255, 0, 0) 

In Arithmetic notation would be:


255/255 = 1.0f
0/255 = 0.0f
0/255 = 0.0f

So, if you want the text-color Red:


  cairo_set_source_rgba(cr, 1.0f, 0.0f, 0.0f, 1.0f)

The last one is the Alpha channel (RGBA).


Info:

RGB

RGBA

Cairo




7) Compile and build the deb packages.



  • quilt refresh

  • fakeroot dpkg-buildpackage


8) Install the deb packages.



  • cd ..



  • sudo dpkg -i *deb




9) Finally you can Restart your machine to see the changes.


Before:


enter image description here


After:


enter image description here


Hope this helps.


[#29038] Thursday, September 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ttarum

Total Points: 417
Total Questions: 101
Total Answers: 115

Location: Maldives
Member since Wed, Nov 4, 2020
4 Years ago
ttarum questions
Sat, Aug 20, 22, 12:42, 2 Years ago
Wed, Sep 28, 22, 18:07, 2 Years ago
Mon, Feb 7, 22, 20:23, 2 Years ago
;