Project

General

Profile

Bug #11338

Huge font size in header

Added by Anton Keks about 3 years ago. Updated about 3 years ago.

Status:
Closed: invalid
Priority:
Low
Assignee:
-
Category:
General
Target version:
Start date:
11/28/2016
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.2.0rc1
System:
Ubuntu
bitness:
64-bit
hardware architecture:
amd64/x86

Description

After updating to 2.2.0-rc1 from 2.0.7, I get a too huge font in the header on Ubuntu 16.10.

darktable-huge-header.png (1.36 MB) darktable-huge-header.png Anton Keks, 11/28/2016 11:44 PM
Screenshot from 2016-11-30 20-22-39.png (1.17 MB) Screenshot from 2016-11-30 20-22-39.png Anton Keks, 11/30/2016 08:22 PM

History

#1 Updated by Tobias Ellinghaus about 3 years ago

  • % Done changed from 0 to 20
  • Status changed from New to Incomplete

- Do you have a custom darktable.css in ~/.config/darktable/?
- What version of GTK3 do you have installed?
- If you compiled darktable yourself, did you make sure to clear build/?

#2 Updated by Anton Keks about 3 years ago

- I don't have custom css
- My Ubuntu 16.10 currently has GTK 3.20.9-1ubuntu2
- I have used Pascal's APT repository for installation

Also, I use a Dell XPS 13 laptop with 1920x1080 resolution.
In Ubuntu Appearance settings, scaling is set to 1.0 (so no scaling).
xdpyinfo reports a DPI of 96.

#3 Updated by Roman Lebedev about 3 years ago

Anton Keks wrote:

- I don't have custom css

- My Ubuntu 16.10 currently has GTK 3.20.9-1ubuntu2

Is that gtk from ubuntu, or from some ppa?
Do make sure that it is not from ppa.

- I have used Pascal's APT repository for installation

Also, I use a Dell XPS 13 laptop with 1920x1080 resolution.
In Ubuntu Appearance settings, scaling is set to 1.0 (so no scaling).
xdpyinfo reports a DPI of 96.

#4 Updated by Tobias Ellinghaus about 3 years ago

Please try copying /usr/share/darktable/darktable.css to ~/.config/darktable/. Then open it in a text editor and look for the only occurrence of "font-size" and replace the number in that line by something small like "5". Then start darktable. Are all the views in the header ("lighttable", "darkroom") and the dropdown small now? Or only parts of them?

#5 Updated by Anton Keks about 3 years ago

I use standard GTK provided by Ubuntu.

By modifying the darktable.css I actually can get the font size correct for my screen (view_dropdown the same size as other labels):

#view_dropdown * {
color: shade(@fg_color, 0.7);
margin: 0;
padding: 0;
font-size: 0.8em;
}

#view_dropdown .button * {
font-size: 0.8em;
}

I think that actually using 'em' for font-sizes here is dangerous, as it is a relative unit to the parent element, at least on the web. Using 'rem' for font-sizes is much better, because it is relative always to the same thing - base font size.

If I set all of the font-sizes, including #header_label, to, say, '1.2rem' - then the whole header UI looks consistent.

#6 Updated by Anton Keks about 3 years ago

Clearly the numbers that are currently there are fine-tuned for a specific screen size/dpi

#7 Updated by Tobias Ellinghaus about 3 years ago

They are not. DPI scaling happens separately. Seeing the one widget that big while all the others are fine is strange and probably a bug somewhere. No idea where though. :-(

#8 Updated by Pascal Obry about 3 years ago

For the record I had a report in French about this issue. But this seems happening only for some users. I have myself (and I'm sure plenty others too) one Ubuntu 16.04 machine and darktable there is looking ok.

I had verified the darktable.css of the guy. We had the same MD5 signature for it. He had no darktable.css on it's .config/darktable directory. We also had the same Gtk+ version installed (all machines were up-to-date).

So, not really helpful, but there is some mystery remaining about this. Fact is you're not alone!

#9 Updated by Tobias Ellinghaus about 3 years ago

What does this return?

find /usr/share/themes/ -name "gtk-3.0"

#10 Updated by Anton Keks about 3 years ago

Only the standard stuff here:
/usr/share/themes/Emacs/gtk-3.0
/usr/share/themes/HighContrast/gtk-3.0
/usr/share/themes/Ambiance/gtk-3.0
/usr/share/themes/Default/gtk-3.0
/usr/share/themes/Radiance/gtk-3.0

By the way, if you still use Ubuntu 16.04, then I noticed a big difference in how Darktable 2.0.x looks like after Ubuntu upgrade to 16.10. This may be due to an upgrade of GTK, but I'm not sure.

On the other hand, please consider my proposal of changing font-sizes to 'rem' units in darktable.css - this eliminates all the problems. Specifying font sizes in 'em' is not correct, if you read the definition of 'em', which is itself based on font-size.

As in the CSS selectors there is '*' - then it can match anything and possibly different things on different machines, so if there is an additional parent element somewhere, by using such css it will inflate the font size, like it happens on stock Ubuntu 16.10.

#11 Updated by Roman Lebedev about 3 years ago

Anton Keks wrote:

Only the standard stuff here:
/usr/share/themes/Emacs/gtk-3.0
/usr/share/themes/HighContrast/gtk-3.0
/usr/share/themes/Ambiance/gtk-3.0
/usr/share/themes/Default/gtk-3.0
/usr/share/themes/Radiance/gtk-3.0

By the way, if you still use Ubuntu 16.04, then I noticed a big difference in how Darktable 2.0.x looks like after Ubuntu upgrade to 16.10. This may be due to an upgrade of GTK, but I'm not sure.

On the other hand, please consider my proposal of changing font-sizes to 'rem' units in darktable.css - this eliminates all the problems. Specifying font sizes in 'em' is not correct, if you read the definition of 'em', which is itself based on font-size.

Our css way is kind-of broken.
Now that it seems like gtk3 is mostly not going to break user legs yet again, maybe we should try to use the proper way, the way gtk themes are generated, to generate fully-functional theme.

As in the CSS selectors there is '*' - then it can match anything and possibly different things on different machines, so if there is an additional parent element somewhere, by using such css it will inflate the font size, like it happens on stock Ubuntu 16.10.

#12 Updated by Tobias Ellinghaus about 3 years ago

Please try installing the Clearlooks theme for GTK3 and running darktable like this:

GTK_THEME=Clearlooks darktable (or GTK_THEME=Clearlooks-Phenix darktable for me, not sure what it's called on Ubuntu). Does that get rid of the big fonts?

About changing the CSS, for one you have to remember that even though it's called "CSS" it's not really following the W3C's specifications. It's just losely based on it but missing many CSS features and adding others. And in our case "em" or "rem" shouldn't make a difference if the GTK theme isn't messing things up as we also control the hierarchy so inheritance can be factored in already. That being said, we don't even specify font sizes in em in our CSS.

#13 Updated by Anton Keks about 3 years ago

FYI, I have tried hooking up an external 1920x1200 monitor while disabling the built-in screen and got exactly the same result - huge font.

#14 Updated by Anton Keks about 3 years ago

I have checked css definitions here: https://developer.gnome.org/gtk3/stable/chap-css-properties.html
'em' is defined the same as by W3C.

$ fgrep -n font-size /usr/share/darktable/darktable.css
172: font-size: 1.7em;
192: font-size: 1.1em;
197: font-size: 1.25em;

The last two are the problem. But all of them could be in 'rem' instead (same value, e.g. 1.2rem) to have the correct result.

#15 Updated by Anton Keks about 3 years ago

Clearlooks-Phoenix didn't help, see the screenshot.

#16 Updated by Tobias Ellinghaus about 3 years ago

I think I know what is happening. For some reason your package ships the CSS file for older versions of GTK3. In the current one there is no em used any more. I will try to work this out with Pascal to see how those files got in the package. Stay tuned.

#17 Updated by Tobias Ellinghaus about 3 years ago

Please show the output of

apt-cache policy darktable

#18 Updated by Anton Keks about 3 years ago

darktable:
Installed: 1:2.2.0~rc1-0pmjdebruijn1~xenial
Candidate: 1:2.2.0~rc1-0pmjdebruijn1~xenial
Version table: *** 1:2.2.0~rc1-0pmjdebruijn1~xenial 500
500 http://ppa.launchpad.net/pmjdebruijn/darktable-unstable/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
2.0.5-2build1 500
500 http://ee.archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages

#19 Updated by Anton Keks about 3 years ago

I have checked and found that there is now support for yakkety in Pascal's PPA, so I downloaded darktable from there and the issue disappeared (no weird font-sizes anymore in darktable.css).

darktable:
Installed: 1:2.2.0~rc1-0pmjdebruijn1~yakkety
Candidate: 1:2.2.0~rc1-0pmjdebruijn1~yakkety
Version table: *** 1:2.2.0~rc1-0pmjdebruijn1~yakkety 500
500 http://ppa.launchpad.net/pmjdebruijn/darktable-unstable/ubuntu yakkety/main amd64 Packages

Thanks.

#20 Updated by Tobias Ellinghaus about 3 years ago

  • % Done changed from 20 to 0
  • Status changed from Incomplete to Closed: invalid

#21 Updated by Roman Lebedev about 3 years ago

  • Target version set to 2.2.0

Also available in: Atom PDF

Go to top