Bug 129235 - PRINTING: Change The Color of Print Preview Active Page Border
Summary: PRINTING: Change The Color of Print Preview Active Page Border
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: low enhancement
Assignee: Abhinav
URL:
Whiteboard: target:7.0.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks: Print-Preview
  Show dependency treegraph
 
Reported: 2019-12-06 13:11 UTC by Rizal Muttaqin
Modified: 2020-05-14 05:30 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Strong blue border (39.22 KB, image/png)
2019-12-06 13:11 UTC, Rizal Muttaqin
Details
WPS Writer's Print Preview (38.14 KB, image/png)
2019-12-06 13:13 UTC, Rizal Muttaqin
Details
solved (176.83 KB, image/png)
2020-05-14 05:30 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rizal Muttaqin 2019-12-06 13:11:00 UTC
Created attachment 156355 [details]
Strong blue border

Steps to reproduce:

1. Create a new text document / open up Writer
2. Create a new page
3. Print preview one of the page (File > Print Preview (Ctrl+Shift+O)

Currently Writer use strong blue color to indicate active selected page which is not pleasant nor elegant to my eyes. Please consider to change it to a lighter blue or remove it completely.

IIRC Word does not show any border in the Print Preview as well as WPS Writer.
Comment 1 Rizal Muttaqin 2019-12-06 13:13:55 UTC
Created attachment 156356 [details]
WPS Writer's Print Preview

No any page border color in WPS Writer
Comment 2 Dieter 2019-12-08 09:29:45 UTC
I would consider this as an enhancement.

cc: Design-Team
Comment 3 Heiko Tietze 2019-12-12 13:42:28 UTC
Good catch, let's try the greenish background or shadow, have some (printer) icons in the background as kind of watermarks, or just a lighter blue frame.
Comment 4 Heiko Tietze 2019-12-12 13:58:02 UTC
Blue rectangle is set in SwPagePreviewLayout::PaintSelectMarkAtPage() at sw/source/core/view/pagepreviewlayout.cxx to COL_LIGHTBLUE.
Comment 5 Heiko Tietze 2019-12-12 14:12:22 UTC
Shadow is done in sw/source/core/layout/paintfrm.cxx: SwPageFrame::PaintBorderAndShadow() ... aShadowColor = SwViewOption::GetShadowColor();
Comment 6 Abhinav 2019-12-15 17:32:04 UTC
Hi.

I'd like to work on this.

I tried to make the border light gray. It does look better than any shade of blue. Here: https://imgur.com/a/pTiS61e

If you could give me the RGB, I could define a new COL_LIGHTERBLUE in include/tools/color.hxx

Here's a few I've tried:

i. 141, 203, 214
ii. 162, 219, 213
iii. 171, 196, 219

Also, could you point me to the code to generate watermarks? Thanks.
Comment 7 Heiko Tietze 2019-12-16 07:19:58 UTC
(In reply to Abhinav from comment #6)
> ... Here: https://imgur.com/a/pTiS61e

Please use two pages so one can see one page without and another with the colored rectangle.

> If you could give me the RGB, I could define a new COL_LIGHTERBLUE in
> include/tools/color.hxx

Wouldn't use this central definition for a color that is used in only one place. Just aColor(141, 203, 214) is fine, IMHO.

> Here's a few I've tried:
> 
> i. 141, 203, 214
> ii. 162, 219, 213
> iii. 171, 196, 219

I leave this to Rizal.

> Also, could you point me to the code to generate watermarks? Thanks.

Well, that was an idea for a completely different look and feel. You would have to find the paint method and add your stuff there. However, the rectangle is used to indicate the selected page (for what reason ever) and the watermark is something similar to the greenish background from WPS for just design purpose.
Comment 8 Thomas Lendo 2020-01-07 22:02:29 UTC
Please don't use kind of watermarks or page background to visualize an active page because this could be misunderstood as part of the page itself and not of the print preview.
Comment 9 Rizal Muttaqin 2020-02-25 23:05:20 UTC
(In reply to Abhinav from comment #6)

> Here's a few I've tried:
> 
> i. 141, 203, 214
> ii. 162, 219, 213
> iii. 171, 196, 219

Could you please produce screenshot of each color and share to me?
Comment 10 Abhinav 2020-02-27 07:02:18 UTC
(In reply to Rizal Muttaqin from comment #9)
> (In reply to Abhinav from comment #6)
> 
> > Here's a few I've tried:
> > 
> > i. 141, 203, 214
> > ii. 162, 219, 213
> > iii. 171, 196, 219
> 
> Could you please produce screenshot of each color and share to me?

Here: https://imgur.com/a/pTiS61e

I updated the album. 

I'd like to hear if you have any suggestions regarding the colors. Also, I think the border shadow looks a bit weird with the lighter colors, so maybe we can do something about it.
Comment 11 Rizal Muttaqin 2020-02-27 08:06:06 UTC
(In reply to Abhinav from comment #10)
> Here: https://imgur.com/a/pTiS61e
> 
> I updated the album. 
> 
> I'd like to hear if you have any suggestions regarding the colors. Also, I
> think the border shadow looks a bit weird with the lighter colors, so maybe
> we can do something about it.

Great, I prefer (20, 40, 51) the most pleasant choice and then (117, 114, 106). The rest looks equivocal and hard to see.

and now after two minutes I prefer (117, 114, 106) hahaha.
Comment 12 Abhinav 2020-02-27 08:34:53 UTC
(In reply to Rizal Muttaqin from comment #11)

> Great, I prefer (20, 40, 51) the most pleasant choice and then (117, 114,
> 106). The rest looks equivocal and hard to see.
> 
> and now after two minutes I prefer (117, 114, 106) hahaha.

So, should we go with (117, 114, 106)?
Comment 13 Rizal Muttaqin 2020-02-28 04:29:18 UTC
(In reply to Abhinav from comment #12)
> (In reply to Rizal Muttaqin from comment #11)
> 
> > Great, I prefer (20, 40, 51) the most pleasant choice and then (117, 114,
> > 106). The rest looks equivocal and hard to see.
> > 
> > and now after two minutes I prefer (117, 114, 106) hahaha.
> 
> So, should we go with (117, 114, 106)?

Yes please
Comment 14 Rizal Muttaqin 2020-05-06 03:20:48 UTC
This bug assigned for two months without any further update
Comment 15 Rizal Muttaqin 2020-05-06 03:29:24 UTC
(In reply to Heiko Tietze from comment #7)

> Please use two pages so one can see one page without and another with the
> colored rectangle.
> 
> > If you could give me the RGB, I could define a new COL_LIGHTERBLUE in
> > include/tools/color.hxx
> 
> Wouldn't use this central definition for a color that is used in only one
> place. Just aColor(141, 203, 214) is fine, IMHO.
> 

Where we can define the new color : aColor(117, 114, 106)?
Comment 16 Heiko Tietze 2020-05-06 07:23:31 UTC
(In reply to Rizal Muttaqin from comment #15)
> Where we can define the new color : aColor(117, 114, 106)?

https://opengrok.libreoffice.org/xref/core/sw/source/core/layout/paintfrm.cxx?r=d4248915#5840
if you follow the breadcumb you find the default in
https://opengrok.libreoffice.org/xref/core/vcl/source/app/settings.cxx?r=c275184a#652
maShadowColor               = COL_GRAY;

So this one is not the blue frame but somewhere in the mentioned function you find it. And I strongly recommend to not change the settings default as those colors likely are used at different places. If needed we could introduce an expert option.
Comment 17 Rizal Muttaqin 2020-05-06 09:45:06 UTC
(In reply to Heiko Tietze from comment #16)
> (In reply to Rizal Muttaqin from comment #15)
> > Where we can define the new color : aColor(117, 114, 106)?
> 
> https://opengrok.libreoffice.org/xref/core/sw/source/core/layout/paintfrm.
> cxx?r=d4248915#5840
> if you follow the breadcumb you find the default in
> https://opengrok.libreoffice.org/xref/core/vcl/source/app/settings.
> cxx?r=c275184a#652
> maShadowColor               = COL_GRAY;
> 
> So this one is not the blue frame but somewhere in the mentioned function
> you find it. And I strongly recommend to not change the settings default as
> those colors likely are used at different places. If needed we could
> introduce an expert option.

I'm not pretty sure about this patch
https://gerrit.libreoffice.org/c/core/+/93521
Comment 18 Commit Notification 2020-05-11 17:40:49 UTC
Rizal Muttaqin committed a patch related to this issue.
It has been pushed to "master":

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

tdf#129235 Change the color of active page border in Print Preview

It will be available in 7.0.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 19 BogdanB 2020-05-14 05:30:04 UTC
Created attachment 160801 [details]
solved

nice! See screenshot

Verified in
Version: 7.0.0.0.alpha1+
Build ID: 47c81498c63ae71a351f43ec2f073ba92d99fc1d
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2020-05-13_06:53:25
Calc: threaded