Article History
 
 
 
Discussion
 
268 views
 
100% Opilion
How to change the UI font size in pxtone collab
 

::|CONTENTS

  1. Obtaining a new style
  2. Importing your new style in ptcollab
  3. Modifying your style
  4. See also
At the moment of writing, pxtone collab (abbreviated ptcollab) doesn't have an option in its settings menu to change the font size of the user interface (UI). In this article, we will see how to do so by editing the style sheet file that controls the appearance of ptcollab.

We will first get an preexisting style, then import this style in ptcollab and finally modify it to actually change the UI font size.

Obtaining a new style



A ptcollab style is formed of the following elements: supposing our style is called StyleInPants, we have a directory StyleInPants, containing at a minimum a file StyleInPants.qss and a file config.ini.

StyleInPants
|
|--------------StyleInPants.qss
|--------------config.ini
|--------------additional files (optional)

Some default styles can be found in the source code of ptcollab, you can get them directly from this link:
https://github.com/yuxshao/ptcollab/tree/master/src/styles

Each of these directories is a style structured as mentioned above, so you can download one of them and go to the next step.


If ever the link is broken, the styles dark, ptCollage and ptcollab-classic are achived here:
https://drive.google.com/drive/folders/1KExcRIPynfoSyTzxpH7vRaqyKkcXs7hL?usp=sharing

You have to extract the archive and go to the directory named styles.

Importing your new style in ptcollab



First we will rename the style you just downloaded to avoid any confusion with the styles already present in ptcollab. Choose a custom name and rename both the style directory and the .qss file according to the structure shown earlier.

Next, we need to locate a directory that can be used to import new styles in ptcollab. The easiest way to do this is to open ptcollab and go to Options -> Settings -> View.

Here you should see an option called Style with a menu from which you can choose a style from a list of default ones. At the right of this menu, there should be a small button. Pressing it open the file manager and show a directory you can use to import custom styles. Copy your new style in this directory.

Return to the Style menu of ptcollab, your custom style should appear in the list of available styles. If it doesn't, then restart ptcollab. After this, if your style is still not shown, you can check again if you named it correctly (as explained in part 1.): if the .qss file is not correctly named, then the style won't appear in the Style menu.

Modifying your style



ptcollab rely on the Qt framework to manage its user interface. One of Qt's features is Qt Style Sheets (QSS), saved as files with a .qss extension. These are written in a language quite similar to CSS and are used to customize the appearance of Qt based applications.

Using your favorite text editor (that is Windows Notepad, TextEdit, Emacs, ... but not LibreOffice Writer or MS Word!), open the Qt Style Sheet of your style, which is the .qss file bearing your style name.

QSS is a very complete tool that let you modify lots of things, for now we will only set (almost) all the fonts of ptcollab to a new size. To do so, you just have to copy-paste the following code at the beginning of the QSS file:

/* FONT SIZE */
QWidget {
font-size: 19pt;
}
/* --------- */


This will set the font of ptcollab to 19pt! You can choose the size you want by modifying 19 to another value.

Note that the two lines delimited by /* and */ aren't actually required. They are just here to keep your code organized but you can remove these if you don't like them.


To apply these modifications, if not already done select your custom style from the ptcollab Style menu, then restart ptcollab. Now it should have the new font size you specified in the QSS file!

See also



pxtone collab styles documentation

archived documentation of pxtone collab styles
(if the previous link is broken): read the file README.md in the directory styles
Qt Style Sheets Reference

pxtone (format)

 
C A T E G O R I E S
 
 
Helper Tools