summaryrefslogtreecommitdiff
path: root/desktop/unx
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2017-11-22 19:05:29 +0100
committerHeiko Tietze <tietze.heiko@googlemail.com>2017-11-23 16:08:51 +0100
commite27e6720ac1f7bb1e44872a7fd3cca5f3340b16a (patch)
tree9b8ab28fe89f11a2f72f58111ff4d68f78096bb4 /desktop/unx
parent2923cb0b5b757a764e285d7295f4e78b8494c5c8 (diff)
tdf#90794 Position of progress bar on high res screens
Introduced two new consts Change-Id: I15e01eabe9fd3225c36d06cbb59310a07a30f2c1 Reviewed-on: https://gerrit.libreoffice.org/45105 Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com> Tested-by: Heiko Tietze <tietze.heiko@googlemail.com>
Diffstat (limited to 'desktop/unx')
-rw-r--r--desktop/unx/source/splashx.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index 6bb98f965a91..8a1064e3673c 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -55,6 +55,8 @@ struct splash
Colormap color_map;
Window win;
GC gc;
+ //true when intro-highres loaded successfully
+ sal_Bool bHasHiDpiImage;
// Progress bar values
// taken from desktop/source/splash/splash.cxx
@@ -611,12 +613,15 @@ static void splash_load_image( struct splash* splash, rtl_uString* pUAppPath )
goto cleanup; /* success */
/* load high resolution splash image */
+ splash->bHasHiDpiImage = sal_False;
if (isHiDPI(splash))
{
- /* TODO- change progress bar parameters after getting size of intro-highres.png */
strcpy (pSuffix, "intro-highres" IMG_SUFFIX);
if ( splash_load_bmp( splash, pBuffer ) )
+ {
+ splash->bHasHiDpiImage = sal_True;
goto cleanup; /* success */
+ }
}
/* load standard resolution splash image */
strcpy (pSuffix, "intro" IMG_SUFFIX);
@@ -655,8 +660,16 @@ static void splash_load_defaults( struct splash* splash, rtl_uString* pAppPath,
get_bootstrap_value( logo, 1, handle, "Logo" );
get_bootstrap_value( bar, 3, handle, "ProgressBarColor" );
get_bootstrap_value( frame, 3, handle, "ProgressFrameColor" );
- get_bootstrap_value( pos, 2, handle, "ProgressPosition" );
- get_bootstrap_value( size, 2, handle, "ProgressSize" );
+ if (isHiDPI(splash) && splash->bHasHiDpiImage)
+ {
+ get_bootstrap_value( pos, 2, handle, "ProgressPositionHigh" );
+ get_bootstrap_value( size, 2, handle, "ProgressSizeHigh" );
+ }
+ else
+ {
+ get_bootstrap_value( pos, 2, handle, "ProgressPosition" );
+ get_bootstrap_value( size, 2, handle, "ProgressSize" );
+ }
if ( logo[0] == 0 )
{