Author Topic: Changing background color of the workspace?  (Read 3894 times)

Offline viktorbravo

  • Member
  • *
  • Posts: 65
Changing background color of the workspace?
« on: 2013 May 02 17:59:10 »
Is there a way in 1.8 to change the background color of the workspace from grey to black?  At times a black background helps me to more easily determine if the image background has a color bias.  I remember there being a way to do this under an old version, but I cannot find it in 1.8

Thanks, Vincent

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Changing background color of the workspace?
« Reply #1 on: 2013 May 03 02:13:23 »
Hi Vincent,

In PixInsight 1.8 all colors and fonts can be customized by editing the core CSS file:

Windows: win.qss
Mac OS X: osx.qss
X11: x11.qss

This file is in the bin installation folder:

Windows:
C:\Program Files\PixInsight\bin

Mac OS X (you have to right-click PixInsight.app and select 'Show Package Contents'):
/Applications/PixInsight.app/Contents/MacOS

Linux (assuming that you have uncompressed the installation package on $HOME/PixInsight):
~/PixInsight/bin

Open the CSS file with a plain text editor (for example, PixInsight's Script Editor). To customize the workspace, locate the following section, approximately at line 1495:

Code: [Select]
/*
 * Workspace
 */

QWidget#WSWorkspace {
   background: #404040;
   selection-background-color: rgba( 255, 255, 255, 20 );
   selection-color: rgba( 128, 160, 255, 255 );
   alternate-background-color: rgba( 208, 160, 106, 255 ); /* maximization limit */
}

To change the background color, change the value of the background property. For example:

   background: #603030;

Instead of hexadecimal notation, you can specify the red, green and blue components as follows:

   background: rgb(96,48,48);

or specify a CSS color name:

   background: black;

The selection-background-color and selection-color properties allow you to customize the background and border, respectively, of rectangular mouse selections when you click and drag on the workspace. The alternate-background-color property defines the color of the vertical maximization limit line (light orange by default).

Once you're done editing the CSS file, save it, exit PixInsight (if it's running) and run it. The core CSS file is fetched once upon application startup.

On Windows (also on Linux if the application has been installed on a system directory) you'll need administrative privileges to save the modified file. You can instead save the file to your Documents folder and copy it back to the bin folder with Windows Explorer, which will ask for permission.

In the final 1.8.0 release it will be also possible to specify a background image for the workspace with the background-image property, but this still doesn't work in 1.8.0 RC7.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline viktorbravo

  • Member
  • *
  • Posts: 65
Re: Changing background color of the workspace?
« Reply #2 on: 2013 May 03 17:03:48 »
Thanks again for the detailed instructions, that was super easy to do.  I have the entire workspace black.  How do I get a black background in the individual image windows as well?

Vincent
« Last Edit: 2013 May 03 17:21:09 by viktorbravo »

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Changing background color of the workspace?
« Reply #3 on: 2013 May 03 18:26:54 »
Hi Vincent,

Look for "QWidget#IVContainer" on line 1290 aprox.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline viktorbravo

  • Member
  • *
  • Posts: 65
Re: Changing background color of the workspace?
« Reply #4 on: 2013 May 03 20:53:09 »
Thanks again Juan, greatly appreciated.

Offline lightwave

  • Newcomer
  • Posts: 6
Re: Changing background color of the workspace?
« Reply #5 on: 2016 May 10 20:33:06 »
Hi Juan

Just wondering how you change the workspace background color and/or image window background color in 1.9.
I like a white background in photoshop and lightroom, it helps me get the color balance correct, so I am keen to have the same in Pixinsight (which is awesome by the way- unless you like sleep!)

Thanks
Craig

« Last Edit: 2016 May 10 23:20:28 by lightwave »

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Changing background color of the workspace?
« Reply #6 on: 2016 May 11 01:09:56 »
Hi Craig,

Look for "QWidget#WSWorkspace" at line 1778. Don't forget to get some sleep from time to time BTW ;)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/