Bug 70102 - RTL: Flipped toolbar button icons dont always look suitable
Summary: RTL: Flipped toolbar button icons dont always look suitable
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.0.1 target:7....
Keywords:
: 95613 114445 (view as bug list)
Depends on:
Blocks: Toolbars Icon-Themes-Code-Language RTL-UI
  Show dependency treegraph
 
Reported: 2013-10-03 21:19 UTC by Tin Man
Modified: 2023-06-23 23:30 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
how the toolbar looks in RTL mode in English and Arabic UIs (112.59 KB, image/png)
2014-06-25 19:20 UTC, Yousuf Philips (jay) (retired)
Details
LibreOffice 6.0 icon RTL (81.48 KB, image/png)
2018-09-10 09:35 UTC, Rizal Muttaqin
Details
Template whose use reproduces icon mirroring issues (9.44 KB, application/vnd.oasis.opendocument.text-template)
2018-10-08 23:10 UTC, Shai Berger
Details
Default bullet and numbering icons in Arabic UI (1.18 KB, image/png)
2020-08-14 08:25 UTC, Rizal Muttaqin
Details
Flipped icon in Arabic UI with RTL paragraph direction (58.12 KB, image/png)
2020-08-14 08:33 UTC, Rizal Muttaqin
Details
Writer (below) compare to Word (above) (8.26 KB, image/png)
2022-07-06 08:20 UTC, Rizal Muttaqin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tin Man 2013-10-03 21:19:32 UTC
LibreOffice flips icons for e.g. line spacing, numbering, and increased indents when switching to RTL mode. This can result in icons with mirrored numerals and sometimes with incorrect appearance (e.g. the icon style may specify lighting from the top left, mirrored icons appear lit from the top right).
It'd be preferrable if separate RTL icons were used instead.

To reproduce, click the RTL button in the toolbar or press Ctrl-Shift-D.
Comment 1 Yousuf Philips (jay) (retired) 2014-06-25 19:19:42 UTC
Hi Mirek2,

It would be great if you can send in an image of how it incorrectly looks as it looks fine in my theme.
Comment 2 Yousuf Philips (jay) (retired) 2014-06-25 19:20:42 UTC
Created attachment 101757 [details]
how the toolbar looks in RTL mode in English and Arabic UIs
Comment 3 Tin Man 2014-06-25 20:51:19 UTC
(In reply to comment #2)
> Created attachment 101757 [details]
> how the toolbar looks in RTL mode in English and Arabic UIs

It's only visible in one icon in the screenshot. Take a close look at the numbering icon and you'll see that the numerals are inverted.
Comment 4 Yousuf Philips (jay) (retired) 2014-06-25 23:38:35 UTC
So other than the number list icon, are there any other icons that would need an RTL version?
Comment 5 Tin Man 2014-08-04 16:55:18 UTC
(In reply to comment #4)
> So other than the number list icon, are there any other icons that would
> need an RTL version?

All icons that are currently being flipped need to be replaced with RTL versions.

Many of those may be perfectly legible when flipped and, in some icon sets, may look exactly the same as their RTL versions would, but generally it's better practice to produce RTL versions than rely on flipped icons. For example, some icon sets are lit asymetrically (e.g. from the top left) and flipped icons look out-of-place among correctly-lit icons. Additionally, some icons that perhaps should be flipped aren't because they contain text -- superscript and subscript for example.
Comment 6 Yousuf Philips (jay) (retired) 2014-08-05 06:27:33 UTC
Adding the ux-team for their input.
Comment 7 Heiko Tietze 2014-10-22 08:19:47 UTC
Is there really need to have two versions of icons, LTR and RTL? I have never seen such an overkill, IMHO, and would rather attribute it to badly designed icons if they don't fit in RTL - not mirrored.
On the other hand it makes sense for the bullets. So why don't we prepare a special icon set for RTL, i.e. put designers in charge and not the devs.
Comment 8 Tin Man 2014-10-26 20:39:55 UTC
(In reply to Heiko Tietze from comment #7)
> Is there really need to have two versions of icons, LTR and RTL? I have
> never seen such an overkill, IMHO, and would rather attribute it to badly
> designed icons if they don't fit in RTL - not mirrored.

No, separate LTR and RTL versions are needed only for a few select icons -- those dependent on text direction. For example: undo, redo, (the new Tango icons use color to distinguish the two), superscript, subscript, bullets, numbering, and I'm sure there are some more, but it's not very many.

> On the other hand it makes sense for the bullets. So why don't we prepare a
> special icon set for RTL, i.e. put designers in charge and not the devs.

It'd be very easy to do -- we just need devs to make it so that an RTL setting prefers icons suffixed with "_rtl" and doesn't flip any icons. It'd be good to get a list of the icons that LibreOffice currently flips, so that we have a list of RTL icons to make.
Comment 9 Maxim Monastirsky 2015-11-05 18:45:05 UTC
*** Bug 95613 has been marked as a duplicate of this bug. ***
Comment 10 Robinson Tryon (qubit) 2016-08-25 05:39:05 UTC Comment hidden (obsolete)
Comment 11 Yousuf Philips (jay) (retired) 2017-10-13 14:14:24 UTC
(In reply to Tin Man from comment #8)
> No, separate LTR and RTL versions are needed only for a few select icons --
> those dependent on text direction. For example: undo, redo, (the new Tango
> icons use color to distinguish the two), superscript, subscript, bullets,
> numbering, and I'm sure there are some more, but it's not very many.

Undo, redo, and bullets look fine to me reversed. Cant reverse or do anything about superscript and subscript as it uses english letters. Numbering uses '1' and '2' which when reserved are flipped which it shouldnt, so this should be fixed.

> It'd be very easy to do -- we just need devs to make it so that an RTL
> setting prefers icons suffixed with "_rtl" and doesn't flip any icons. It'd
> be good to get a list of the icons that LibreOffice currently flips, so that
> we have a list of RTL icons to make.

Maxim: What do you think of this solution of switching in rtl icons, as flipping the current one doesnt generate a suitable icon?
Comment 12 Maxim Monastirsky 2017-12-16 21:03:13 UTC
*** Bug 114445 has been marked as a duplicate of this bug. ***
Comment 13 Yousuf Philips (jay) (retired) 2017-12-16 21:41:47 UTC
So this doesnt affect breeze and galaxy icon themes which use roman numerals in the numbering list icon, but affects other icon themes that use 1 and 2 in their icon.
Comment 14 Rizal Muttaqin 2018-09-10 09:35:21 UTC
Created attachment 144770 [details]
LibreOffice 6.0 icon RTL

In the 6.0 version, this is not reproducable

إصدارة: Version: 6.0.6.2
Build ID: 1:6.0.6-0ubuntu0.16.04.1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: id-ID (id_ID.UTF-8); Calc: group
Comment 15 Eyal Rozenberg 2018-09-17 17:33:11 UTC
From a user's perspective, I suggest great care be taken to asses users' reaction to icon direction flipping. Some may like it, some may not.

Anyway, things haven't changed as of 6.1.1.2
Comment 16 Shai Berger 2018-10-08 23:10:37 UTC
Created attachment 145501 [details]
Template whose use reproduces icon mirroring issues

Hi,

I cannot reproduce the bug when opening a blank new document, but it does show up if I use the template I am attaching here.

Version: 6.1.2.1
Build ID: 1:6.1.2-1
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3; 
Locale: en-US (en_IL.UTF-8); Calc: group threaded

(en_IL is a bit of a fabricated locale, but I've tried with en_US.UTF-8 and he_IL.UTF-8 and it didn't make any difference)
Comment 17 Boaz Dodin 2019-03-07 19:31:22 UTC
The numbered list icon in RTL LO 6.2.2.1 on Windows 10 1803 is wrong (mirrored 1 and 2 numbers), Colibre theme.

As this pretty old bug, I am wondering if new bug should be opened, for the specific icon issue?
Comment 18 Xisco Faulí 2019-03-20 18:36:13 UTC
(In reply to Boaz Dodin from comment #17)
> The numbered list icon in RTL LO 6.2.2.1 on Windows 10 1803 is wrong
> (mirrored 1 and 2 numbers), Colibre theme.
> 
> As this pretty old bug, I am wondering if new bug should be opened, for the
> specific icon issue?

I think this issue still applies...
Comment 19 andreas_k 2019-04-24 09:41:34 UTC
I submitted today an patch where I add rtl icon support in the language folder where flipping isn't useful. For me that's an good solution, cause it is language specific and don't need coding work.

I hope it will work fine for everybody.
Comment 20 andreas_k 2019-04-24 09:50:22 UTC
fix:
https://gerrit.libreoffice.org/#/c/71147/

Change-Id: I3114afc6856f2a44127b2959408337c464d9ff88
Comment 21 Buovjaga 2019-04-24 12:30:43 UTC
Tested by launching with SAL_RTL_ENABLED=1 and the numbered list icon is ok in all icon themes.

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: cfbb223d5666cb803539ac98918ff39b27efc6e7
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 24 April 2019
Comment 22 andreas_k 2019-04-24 20:37:20 UTC
awesome so best practice to fix this bugs is to add language specific icons to the cmd folder.
Comment 23 Shai Berger 2019-04-24 21:15:04 UTC
(In reply to Buovjaga from comment #21)
> Tested by launching with SAL_RTL_ENABLED=1 and the numbered list icon is ok
> in all icon themes.
> 

Hi, thanks for your help, although it is unclear to me: 

1) Did you test with Andreas` patch?
2) Did you try the template I attached?

Thanks,
Shai
Comment 24 Buovjaga 2019-04-24 22:03:43 UTC
Ok, apologies, for some reason I ignored completely the original description for this. This does not need an RTL UI - I can reproduce the problem simply by clicking the RTL button.

Andreas's commit was in my build.
Comment 25 Rizal Muttaqin 2019-04-26 08:03:48 UTC
Andreas patch is just related to Arabic UI, not RTL input. So, we need a dev touch here. My suggestion is to replace flipping behavior with pointing to an RTL icon UI instead. Does the coding work is considerable as a easyhack?
Comment 26 andreas_k 2019-04-26 08:43:29 UTC
when it's an easyhack than an codepointer is needed.
Comment 27 Commit Notification 2020-06-27 13:42:56 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/089979571967dc5e78e82ec6ba3fb97cbfbbe525

Breeze: tdf#133538, tdf#126122, tdf#70102

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2020-06-27 15:05:03 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/60632e4f6bf46f3320f6536cd6e944bb1dac169c

Breeze: tdf#133538, tdf#126122, tdf#70102

It will be available in 7.0.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 29 Rizal Muttaqin 2020-08-14 08:25:14 UTC
Created attachment 164299 [details]
Default bullet and numbering icons in Arabic UI

For your information, I managed to provide icon additions to all themes for RTL language (Arabic, Hebrew, Persian, Urdu) so it will looked like in the above attachment. 

Unfortunately there is no correlation between RTL UI with RTL-type document that make this thing messed up. When one using Arabic UI, LibreOffice always treat document by default as a LTR type so when user try to change paragraph direction then the icon flipped badly.

Here come my suggestions:

1. Make RTL-LTR UI choice affects the default RTL-LTR document type. So RTL UI user will get a RTL document type and a LTR UI will get LTR document type.

2. If user want to change the document direction type, make icon use another version, not simply flipped them.

For example for general (LTR UI), we have `cmd/sc_defaultbullet.png` icon for bullet list. While for Arabic I made `ar/cmd/sc_default.bullet.png`. So when an Arabic UI user open Writer, he should get `ar/cmd/sc_default.bullet.png` and when he/she switch paragraph direction to LTR he/she should get `cmd/sc_defaultbullet.png` icon.

This quite simple as we have done for design part but clearly need a code.
Comment 30 Rizal Muttaqin 2020-08-14 08:33:24 UTC
Created attachment 164301 [details]
Flipped icon in Arabic UI with RTL paragraph direction

Here's example how paragraph direction flipped the icon badly
Comment 31 Commit Notification 2021-01-17 22:41:32 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/d744883fe2cc26b1a5cec5f431541192d0672cc5

elementary: tdf#70102 repir RTL bullet numbering icons

It will be available in 7.1.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Commit Notification 2021-01-18 00:58:39 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2081eac430ac69619149e44b453a2d7dda41fc83

elementary: tdf#70102 repir RTL bullet numbering icons

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 33 Commit Notification 2021-03-21 05:43:53 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6a706be2a2b46e243819a441cb504cd6c4e1ca00

tdf#70102 Colibre: Sync RTL numbering icon with LTR variant

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 34 Rizal Muttaqin 2022-07-06 08:20:21 UTC
Created attachment 181134 [details]
Writer (below) compare to Word (above)

This is brief comparison how it looks between MS Office Word 365 and LibreOffice Writer.

LibreOffice needs code to point the RTL document to the icon I've created in the cmd/ar/ or cmd/32/ar/ directory

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 988285410f8883ad49f32c4b804c4f5bd14569d0
CPU threads: 8; OS: Windows 10.0 Build 22000; UI render: Skia/Vulkan; VCL: win
Locale: id-ID (id_ID); UI: id-ID
Calc: CL
Comment 35 Rizal Muttaqin 2022-07-06 08:26:59 UTC
@Maxim Monastirsky, thought you are interested with this issue, as you tackle the one which is similar in tdf#149741
Comment 36 Rizal Muttaqin 2023-06-23 23:30:45 UTC
Copied comment from tdf#154450:


Generally speaking, current non LTR icon behaviour is suboptimal. I would like to see proper RTL support for icon themes from coding point of view. Currently, many icons just flipped horizontally for RTL text and 90 degrees clockwise for top to bottom text.

Instead of using the flipping method above, I suggest that LibreOffice intelligently recognizes the RTL content and then instructs it to use a separate RTL version of the icon file. Say for example lc_defaultnumbering.<png|svg> for LTR content, then there's lc_defaultnumbering-rtl.<png|svg> or lc_defaultnumbering_rtl.<png|svg> for RTL one.


The only way I as an icon designer can change the appearance of an icon from LTR to RTL is to use a localized variant. For example I created some RTL icons in cmd/ar/ and cmd/32/ar directories for Arabic (and linking it for Hebrew, Urdu and Parsi). This is actually quite problematic, however, because there is no guarantee that users of Arabic RTL text will definitely use the Arabic interface. It is possible that the interface used is American English while the content produced is RTL text.

Then the localized icons that I made became even more messy when given the flipping treatment.