Bug 281574 - Black background for preview in fullscreen [patch]
Summary: Black background for preview in fullscreen [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Image (show other bugs)
Version: 2.1.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 18:43 UTC by Bruno Randolf
Modified: 2014-09-05 21:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.3.0
Sentry Crash Report:


Attachments
Patch to make preview background black in fullscreen (2.78 KB, patch)
2011-09-07 18:43 UTC, Bruno Randolf
Details
Patch for 2.5.0 (2.61 KB, patch)
2012-01-18 00:15 UTC, Bruno Randolf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Randolf 2011-09-07 18:43:36 UTC
Created attachment 63488 [details]
Patch to make preview background black in fullscreen

Version:           2.1.0 (using KDE 4.6.2) 
OS:                Linux

This patch changes the background color of the preview to black if it is in fullscreen mode. Also the border is changed to no border. This way it's easier to review the photo on a black background.

Reproducible: Always

Steps to Reproduce:
Apply the patch ;)

Actual Results:  
The background is white (depending on the theme).

Expected Results:  
Black background for Preview in Fullscreen mode.

I'm not sure if this is the best way to implement it or if it would be better to use signals & slots, but it works...
Comment 1 caulier.gilles 2011-09-07 18:57:00 UTC
Thanks for the patch

We will review it for 2.2.0

Gilles Caulier
Comment 2 caulier.gilles 2011-12-16 11:28:30 UTC
Bruno,

Can you update your patch for next 2.5.0 release.

Thanks in advance

Gilles Caulier
Comment 3 Bruno Randolf 2012-01-18 00:15:40 UTC
Created attachment 67945 [details]
Patch for 2.5.0

The patch based on 2.5.0...
Comment 4 caulier.gilles 2013-10-30 15:35:42 UTC
Bruno,

Your patch cannot be applied against git/master. Please update it :

[gilles@localhost core]$ patch -p1 < digikam-fullscreen-black-2.5.0.diff 
patching file digikam/main/digikamapp.cpp
Hunk #1 succeeded at 2744 with fuzz 2 (offset 69 lines).
patching file digikam/views/digikamview.cpp
Hunk #1 succeeded at 1995 with fuzz 1 (offset 116 lines).
patching file digikam/views/digikamview.h
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file digikam/views/digikamview.h.rej
patching file libs/widgets/graphicsview/graphicsdimgview.cpp
patching file libs/widgets/graphicsview/graphicsdimgview.h
Hunk #1 succeeded at 71 (offset 3 lines).

Gilles Caulier
Comment 5 Bruno Randolf 2013-10-30 15:49:25 UTC
On 10/30/2013 03:35 PM, Gilles Caulier wrote:
> https://bugs.kde.org/show_bug.cgi?id=281574
> 
> --- Comment #4 from Gilles Caulier <caulier.gilles@gmail.com> ---
> Bruno,
> 
> Your patch cannot be applied against git/master. Please update it :
> 
> [gilles@localhost core]$ patch -p1 < digikam-fullscreen-black-2.5.0.diff 
> patching file digikam/main/digikamapp.cpp
> Hunk #1 succeeded at 2744 with fuzz 2 (offset 69 lines).
> patching file digikam/views/digikamview.cpp
> Hunk #1 succeeded at 1995 with fuzz 1 (offset 116 lines).
> patching file digikam/views/digikamview.h
> Hunk #1 FAILED at 76.
> 1 out of 1 hunk FAILED -- saving rejects to file
> digikam/views/digikamview.h.rej
> patching file libs/widgets/graphicsview/graphicsdimgview.cpp
> patching file libs/widgets/graphicsview/graphicsdimgview.h
> Hunk #1 succeeded at 71 (offset 3 lines).
> 
> Gilles Caulier
> 

No wonder if you try to apply the patch two years after I originally
sent it in... :(

I don't have a development environment set up for this right now, so I
can not rebase. The patch is simple enough that you could easily
integrate the changes if you wanted.

bruno
Comment 6 caulier.gilles 2013-10-30 15:53:35 UTC
Hi Bruno,

>I don't have a development environment set up for this right now, so I
>can not rebase. The patch is simple enough that you could easily
>integrate the changes if you wanted.

yes, bu ti have other patches to review in my TODO list, and list is long. So for me the best way is to delegate as i can to optimize time. I cannot do all. Sorry...

Gilles Caulier
Comment 7 Bruno Randolf 2013-10-30 15:59:24 UTC
On 10/30/2013 03:53 PM, Gilles Caulier wrote:
> yes, bu ti have other patches to review in my TODO list, and list is long. So
> for me the best way is to delegate as i can to optimize time. I cannot do all.
> Sorry...

OK, But did you even look at the patch?

The part which failed is just one line in digikam/views/digikamview.h
+ void toggleFullScreen(bool);

- Should be very easy to fix.

Anyhow take it or leave it, as I said it's been two years...

bruno
Comment 8 caulier.gilles 2013-10-30 17:43:01 UTC
Only format the patch to be compatible with git/master, i will test it and look problem with toggleFullScreen()

Thanks

Gilles Caulier
Comment 9 caulier.gilles 2014-08-29 22:19:19 UTC
Bruno,

Can you update your patch against git/master implementation. I think your solution will improve Preview mode in full screen mode.

Thanks in advance

Gilles Caulier
Comment 10 caulier.gilles 2014-09-05 21:52:16 UTC
Git commit 4cf170065957084e0a63bb335328a419b208574f by Gilles Caulier.
Committed on 05/09/2014 at 21:49.
Pushed by cgilles into branch 'master'.

Apply patch #67945 to change canvas background to black in fullscreen mode in Preview Mode to improve image review.
Adapt this patch to ImportUI and LightTable which use same preview widget.
ImportUI : force to reload settings when setup have been changed
FIXED-IN: 4.3.0

M  +2    -1    NEWS
M  +2    -0    digikam/main/digikamapp.cpp
M  +5    -0    digikam/views/digikamview.cpp
M  +1    -0    digikam/views/digikamview.h
M  +15   -1    libs/widgets/graphicsview/graphicsdimgview.cpp
M  +2    -1    libs/widgets/graphicsview/graphicsdimgview.h
M  +20   -8    utilities/importui/main/importui.cpp
M  +2    -1    utilities/importui/main/importui.h
M  +5    -0    utilities/importui/views/importview.cpp
M  +1    -0    utilities/importui/views/importview.h
M  +6    -0    utilities/lighttable/lighttableview.cpp
M  +1    -0    utilities/lighttable/lighttableview.h
M  +1    -0    utilities/lighttable/lighttablewindow.cpp

http://commits.kde.org/digikam/4cf170065957084e0a63bb335328a419b208574f