Opened 22 months ago

Closed 21 months ago

Last modified 14 months ago

#15009 closed defect (fixed)

Use native (flat) status bars field borders on non Windows 95 like systems by default

Reported by: kosenko Owned by:
Priority: normal Milestone: 3.0.0
Component: wxGTK Version: stable-latest
Keywords: Cc: hramrach@…
Blocked By: Blocking:
Patch: yes

Description

I have understood why too many end users think that applications has no native look and feel under wxGTK.

Sunken status bars has Windows 95-like style and looks very ugly especially in GTK+. Even Windows XP and 7 has no this style. GTK+ applications use GtkLabel and this widget has flat borders. AFAICS all Linux editors has no any delimiters in the status bars, all panes is flat there.

In the first glance at application end user see that status bar has no native look and they start thinking that whole application has no native look and feel. First impression is very important! Even worse status bar is usually always visible and user must see on it when works with application all the time.

Also raised and sunken status bar have unexpected look with dark system themes because shadows with wxSYS_COLOUR_3DSHADOW and wxSYS_COLOUR_3DHILIGHT colors is usually not correct on the dark foreground.

So I think that we should use flat status bars instead of sunken ones everywhere by default except Windows 95 style systems.

Also I have added wxSB_SUNKEN style for consistency.

Attachments (10)

statusbar_border.diff download (6.4 KB) - added by kosenko 22 months ago.
Add wxSB_SUNKEN style to the statbar sample
statbar-current.png download (3.4 KB) - added by vadz 21 months ago.
Current minimal sample screenshot
statbar-new.png download (3.3 KB) - added by vadz 21 months ago.
Minimal sample screenshot after the patch
screenshot-20131016164011.png download (38.5 KB) - added by hramrach 14 months ago.
layout demo with wxwidgets 3 gtk2
screenshot-20131016164024.png download (31.9 KB) - added by hramrach 14 months ago.
layout demo with wxwidgets 2.8 gtk2
screenshot-20131016141745.png download (133.7 KB) - added by hramrach 14 months ago.
screenshot of native GTK2 application
gedit_default.png download (22.8 KB) - added by hramrach 14 months ago.
gedit_borderless.png download (22.2 KB) - added by hramrach 14 months ago.
gedit_gnome.png download (51.6 KB) - added by kosenko 14 months ago.
gEdit under GNOME
gedit_unity.png download (52.8 KB) - added by kosenko 14 months ago.
gEdit under Unity

Download all attachments as: .zip

Change History (26)

Changed 22 months ago by kosenko

Add wxSB_SUNKEN style to the statbar sample

comment:1 follow-up: Changed 21 months ago by kosenko

Is there any problems with this patch?

Changed 21 months ago by vadz

Current minimal sample screenshot

Changed 21 months ago by vadz

Minimal sample screenshot after the patch

comment:2 in reply to: ↑ 1 ; follow-up: Changed 21 months ago by vadz

  • Milestone set to 3.0

Replying to kosenko:

Is there any problems with this patch?

No, I just didn't have time for any wx work recently, sorry.

Anyhow, now that I did finally have a look at it, I'm not sure I agree with the change. It's true that the sunken status bar looks out of place but not having any separator at all between the status bar and the main window doesn't look right neither. I don't actually know what is the "modern" look and feel of GNOME systems (I use a pretty ancient one myself...) but even the screenshot in the official docs shows a separator line. Shouldn't we draw it by default?

What do people think, which appearance is better: current one

Current minimal sample screenshot

or the new one

Minimal sample screenshot after the patch

?

comment:3 in reply to: ↑ 2 Changed 21 months ago by kosenko

Replying to vadz:

Anyhow, now that I did finally have a look at it, I'm not sure I agree with the change. It's true that the sunken status bar looks out of place but not having any separator at all between the status bar and the main window doesn't look right neither. I don't actually know what is the "modern" look and feel of GNOME systems (I use a pretty ancient one myself...) but even the screenshot in the official docs shows a separator line. Shouldn't we draw it by default?

This screenshot is from GTK+ 2.6 that was released 16 December 2004, about ten years ago. Currently Linux distributions work with GTK+ 3 libraries and applications, GTK+ 2 is just for backward compatibility. Latest official documentation has no any separators. Separators create visual noise. Also there is central widget in the frame in most cases, so we will have doubled vertical separators.

What do people think, which appearance is better: current one or the new one?

First image look was in repository more then 15 years and many wx developers got into the habit this look, but end users work with GNOME applications that have second image look. So it is a time to move from wxGTK/Windows95 look to the original GTK+ one.

First image is cluttered by lines. Second one is clean and simple, and it looks natively under GNOME.

comment:4 Changed 21 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [73691]) Use flat generic status bar by default and add wxSB_SUNKEN.

GTK+ applications don't use sunken status bars since many years, do don't do
it in wxWidgets neither by default any more. Add wxSB_SUNKEN style that can be
explicitly used if the old appearance is desired.

Closes #15009.

comment:5 Changed 14 months ago by hramrach

I don't understand. GTK+ applications *do* use statusbar with bevels.

The bevels in wxGTK are wrong colour, however.

comment:6 Changed 14 months ago by hramrach

  • Cc hramrach@… added

comment:7 Changed 14 months ago by vadz

Ideally we should use whatever the current theme does. But I don't know which theme/renderer methods should be used here. If anybody could have a look, it'd be great.

comment:8 follow-up: Changed 14 months ago by hramrach

The default GTK theme uses bevels. Also some of the samples look bad without the bevels - eg. layout sample. I would expect that there is much code out there that would suffer from the same problem.

It is true that you can use different engines in GTK and customize the look in any way you like. eg. the pixmap engine that uses user-supplied bitmaps for everything used to be popular.

I am not sure what other platforms do. I see the very same bevels on Windows Server 2003 but 2003 is a bit dated. Even if you go for flat look you still need a flat border to make the statusbar distinguishable from main window content and the different status ares one from another.

With the layout demo with wxwidgets 3.0-rc1 gtk2 you can't even tell if there is a margin or a statusbar until you happen to point to something that shows text in it. With wxwidgets 2.8.12 gtk2 you can clearly see there is a statusbar and it has two areas (for whatever reason) but the bevel is drawn in black and white, not the theme colour.

I would post some pictures but I don;t see that option in trac.

comment:9 Changed 14 months ago by vadz

You can insert the pictures directly into the comments, follow the WikiFormatting link to find out how. But I think it's not even necessary, it's clear that on your system sunken borders are used while on the OP's system they are not. And I don't really know which is better, I already asked about opinions about this in the comment:2 but didn't get any responses. So I still don't know what to do, it's clear that any hard coded look will make somebody unhappy but I don't have the time to implement the themed look.

Changed 14 months ago by hramrach

layout demo with wxwidgets 3 gtk2

Changed 14 months ago by hramrach

layout demo with wxwidgets 2.8 gtk2

Changed 14 months ago by hramrach

screenshot of native GTK2 application

comment:10 in reply to: ↑ 8 Changed 14 months ago by kosenko

I don't understand. GTK+ applications *do* use statusbar with bevels.


Native GNOME applications such as gEdit don't use bevels in the status bar. And they look very good.

The default GTK theme uses bevels. Also some of the samples look bad without the bevels - eg. layout sample. I would expect that there is much code out there that would suffer from the same problem.


GTK+/GNOME designers don't think so. GtkStatusbar has no bevels in API documentation. Also Statusbars GNOME Human Interface Guidelines says "Flat appearance for areas that are not interactive". It means that static text lines should be flat in the status bar.

I am not sure what other platforms do. I see the very same bevels on Windows Server 2003 but 2003 is a bit dated.


wxGTK/Win32 port not uses native widgets at all under Windows. We should not use Windows 95 look and feel everywere.

Even if you go for flat look you still need a flat border to make the statusbar distinguishable from main window content and the different status ares one from another.


You could use wxStaticLine, wxSB_SUNKEN and wxSB_RAISED styles in your application if it is critical here. But it looks very ugly with themes without bevels.

Currently wxStatusBar isn't native under wxGTK and there is an effort to implement it natively there in #10955. And we could have there native themes implementation for wxSB_SUNKEN and wxSB_RAISED styles. But in any case by default status bar must be flat.

Changed 14 months ago by hramrach

Changed 14 months ago by hramrach

comment:11 Changed 14 months ago by hramrach

I still don't understand.

This is what gedit looks like with default theme and this is what it looks with a theme that does not have borders and margins (because I don't use gtk3 enough to bother adding them) and that's what you are getting with the current change, not something like
https://developer.gnome.org/hig-book/stable/images/controls-status-bar-interactive.png.en

Note that the flat vs bevel look is only relevant to the particular area with respect to the rest of the statusbar. The statusbar still may and should have a border, and the default theme includes a sunken border and it looks very good.

So to follow those GHIG if that's your goal you have to prod application maintainers to distinguish interactive and non-interactive statusbar areas. That's nothing you can do automagically by changing something in wxGTK unless you are willing to examine the widget tree and search for interactive widget there to determine the default border style.

The problem here is compatibility. Yes, you can style the statusbar any way you want, even better than before. But the change to default look you apply makes the statusbar very indistinct like in the borderless theme and applications written for wxwidgets 2.8 may and probably do expect that the statusbar is noticeable and the different areas separated.

For me the lack of separation between different status areas creates visual clutter because you are never sure if you are still reading one thing or you are just continuing somewhere else without even noticing. gEdit adds a gap between the position and insert status so you don't really get that problem but how many wxwidgets applications don't?

Changed 14 months ago by kosenko

gEdit under GNOME

Changed 14 months ago by kosenko

gEdit under Unity

comment:12 Changed 14 months ago by kosenko

This is what gedit looks like with default theme


It is a built-in Windows 95-like theme that is used only when other themes isn't available during application development. GNOME and Unity default themes is much different.

gEdit under GNOME
gEdit under Unity

and that's what you are getting with the current change, not something like


We are talking about static text in the status bar ("Ln 1, Col 1", "INS", "Saving...." labels) and they are very flat on screenshots.

gEdit adds a gap between the position and insert status so you don't really get that problem but how many wxwidgets applications don't?


GTK+ and wxWidgets architectures is similar. There is spaces between status bar fields, also it is possible to use commas inside text fields.

For me the lack of separation between different status areas creates visual clutter because you are never sure if you are still reading one thing or you are just continuing somewhere else without even noticing.


GNOME designers have other opinion, they explicitly said that not interactive areas must be flat in the status bars.

comment:13 Changed 14 months ago by hramrach

I can't see the spacing with the available demos but I suspect it's very small for the case without separators.

No, they say that the field itself should be flat, not that statusbar should be flat, and it is indeed distinct from the main window area. Since the field bevel was the only distinction from the main application area in wxwidgets it is now gone. Compare the default gnome and unity look with the wxwidgets 3 look.

Either way the only final solution is native statusbar. For the time being I think that if flat statusbar is what you want I would suggest to increase the the spacing between fileds to around 1em and add a plain single line above the statusbar so it does not unexpectedly bleed into window content of applications that were designed with the old look in mind.

comment:14 Changed 14 months ago by vadz

Using native status bar is not really an option because it supports one field only and our API exposes the existence of several fields (called "panes"). So unless we can emulate this somehow, we should just use the proper theme methods for drawing, this seems like a much more promising approach to me...

comment:15 Changed 14 months ago by hramrach

Problem is we don't have proper theme methods for drawing. This is why this bug started in the first place.

In gtk2 statusbar can have multiple items without problems. In gtk3 populating the statusbar seems somewhat challenging but gedit obviously managed.

comment:16 Changed 14 months ago by kosenko

BTW here is gEdit status bar implementation. We also could have native GtkStatusBar inside wxStatusBar. If field have not empty text we also could use GtkLabel.

Note: See TracTickets for help on using tickets.