25
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: cuicscrollbar.cpp
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "cuicscrollbar.h"
|
|
19 |
#include "emailtrace.h"
|
|
20 |
|
|
21 |
#include <alf/alfenv.h>
|
|
22 |
#include <alf/alfevent.h>
|
|
23 |
#include <alf/alfimagevisual.h>
|
|
24 |
#include <alf/alftexture.h>
|
|
25 |
#include <alf/alfanchorlayout.h>
|
|
26 |
#include <alf/alfdecklayout.h>
|
|
27 |
#include <AknUtils.h>
|
|
28 |
#include <aknlayoutscalable_apps.cdl.h>
|
|
29 |
|
|
30 |
// Constants
|
|
31 |
|
|
32 |
// Scroll bar opacity (visible)
|
|
33 |
const TReal32 KVisibleOpacity = 1.0f;
|
|
34 |
// Thumb opacity (visible)
|
|
35 |
const TReal32 KVisibleOpacityThumb = 0.85f;
|
|
36 |
// Background opacity (visible)
|
|
37 |
const TReal32 KVisibleOpacityBackground = 0.65f;
|
|
38 |
// How long scrollbar will be visible after change
|
|
39 |
const TReal32 KVisibleTimeout = 250;
|
|
40 |
// How long fading will take
|
|
41 |
const TReal32 KFadeTimeout = 500;
|
|
42 |
|
|
43 |
// Local methods
|
|
44 |
|
|
45 |
// ---------------------------------------------------------------------------
|
|
46 |
// ScrollBarWidth
|
|
47 |
// ---------------------------------------------------------------------------
|
|
48 |
TInt ScrollBarWidth()
|
|
49 |
{
|
|
50 |
FUNC_LOG;
|
|
51 |
TRect mainPaneRect;
|
|
52 |
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
|
|
53 |
TAknLayoutRect layoutRect;
|
|
54 |
layoutRect.LayoutRect( mainPaneRect, AknLayoutScalable_Apps::main_sp_fs_email_pane() );
|
|
55 |
layoutRect.LayoutRect( layoutRect.Rect(), AknLayoutScalable_Apps::listscroll_cmail_pane() );
|
|
56 |
layoutRect.LayoutRect( layoutRect.Rect(), AknLayoutScalable_Apps::list_cmail_pane() );
|
|
57 |
layoutRect.LayoutRect( layoutRect.Rect(), AknLayoutScalable_Apps::sp_fs_scroll_pane_cp02() );
|
|
58 |
return layoutRect.Rect().Width();
|
|
59 |
}
|
|
60 |
|
|
61 |
// CUiCCompositeImage
|
|
62 |
|
|
63 |
// ---------------------------------------------------------------------------
|
|
64 |
// CUiCCompositeImage::NewL
|
|
65 |
// ---------------------------------------------------------------------------
|
|
66 |
//
|
|
67 |
CUiCCompositeImage* CUiCCompositeImage::NewL( CAlfControl& aControl,
|
|
68 |
CAlfLayout* aParentLayout, CAlfTexture& aTop,
|
|
69 |
CAlfTexture& aMiddle, CAlfTexture& aBottom )
|
|
70 |
{
|
|
71 |
FUNC_LOG;
|
|
72 |
CUiCCompositeImage* self = new (ELeave) CUiCCompositeImage();
|
|
73 |
CleanupStack::PushL( self );
|
|
74 |
self->ConstructL( aControl, aParentLayout, aTop, aMiddle, aBottom );
|
|
75 |
CleanupStack::Pop(); // self
|
|
76 |
return self;
|
|
77 |
}
|
|
78 |
|
|
79 |
// ---------------------------------------------------------------------------
|
|
80 |
// CUiCCompositeImage::~CUiCCompositeImage
|
|
81 |
// ---------------------------------------------------------------------------
|
|
82 |
//
|
|
83 |
CUiCCompositeImage::~CUiCCompositeImage()
|
|
84 |
{
|
|
85 |
FUNC_LOG;
|
|
86 |
}
|
|
87 |
|
|
88 |
// ---------------------------------------------------------------------------
|
|
89 |
// CUiCCompositeImage::Layout
|
|
90 |
// ---------------------------------------------------------------------------
|
|
91 |
//
|
|
92 |
CAlfLayout& CUiCCompositeImage::Layout()
|
|
93 |
{
|
|
94 |
FUNC_LOG;
|
|
95 |
return *iLayout;
|
|
96 |
}
|
|
97 |
|
|
98 |
// ---------------------------------------------------------------------------
|
|
99 |
// CUiCCompositeImage::CUiCCompositeImage
|
|
100 |
// ---------------------------------------------------------------------------
|
|
101 |
//
|
|
102 |
CUiCCompositeImage::CUiCCompositeImage()
|
|
103 |
{
|
|
104 |
FUNC_LOG;
|
|
105 |
}
|
|
106 |
|
|
107 |
// ---------------------------------------------------------------------------
|
|
108 |
// CUiCCompositeImage::ConstructL
|
|
109 |
// ---------------------------------------------------------------------------
|
|
110 |
//
|
|
111 |
void CUiCCompositeImage::ConstructL( CAlfControl& aControl, CAlfLayout* aParentLayout,
|
|
112 |
CAlfTexture& aTop, CAlfTexture& aMiddle, CAlfTexture& aBottom )
|
|
113 |
{
|
|
114 |
FUNC_LOG;
|
|
115 |
iLayout = CAlfAnchorLayout::AddNewL( aControl, aParentLayout );
|
|
116 |
iTop = CAlfImageVisual::AddNewL( aControl, iLayout );
|
|
117 |
iTop->SetImage( TAlfImage( aTop ) );
|
|
118 |
iMiddle = CAlfImageVisual::AddNewL( aControl, iLayout );
|
|
119 |
iMiddle->SetImage( TAlfImage( aMiddle ) );
|
|
120 |
iBottom = CAlfImageVisual::AddNewL( aControl, iLayout );
|
|
121 |
iBottom->SetImage( TAlfImage( aBottom ) );
|
|
122 |
SetAnchors();
|
|
123 |
}
|
|
124 |
|
|
125 |
// ---------------------------------------------------------------------------
|
|
126 |
// CUiCCompositeImage::SetAnchors
|
|
127 |
// ---------------------------------------------------------------------------
|
|
128 |
//
|
|
129 |
void CUiCCompositeImage::SetAnchors()
|
|
130 |
{
|
|
131 |
FUNC_LOG;
|
|
132 |
const TInt width( ScrollBarWidth() );
|
|
133 |
|
|
134 |
// iTop
|
|
135 |
iLayout->SetAnchor(
|
|
136 |
EAlfAnchorTopLeft, 0,
|
|
137 |
EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
|
|
138 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
139 |
TAlfTimedPoint( 0, 0 ) );
|
|
140 |
iLayout->SetAnchor(
|
|
141 |
EAlfAnchorBottomRight, 0,
|
|
142 |
EAlfAnchorOriginRight, EAlfAnchorOriginTop,
|
|
143 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
144 |
TAlfTimedPoint( 0, width ) );
|
|
145 |
|
|
146 |
// iMiddle
|
|
147 |
iLayout->SetAnchor(
|
|
148 |
EAlfAnchorTopLeft, 1,
|
|
149 |
EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
|
|
150 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
151 |
TAlfTimedPoint( 0, width ) );
|
|
152 |
iLayout->SetAnchor(
|
|
153 |
EAlfAnchorBottomRight, 1,
|
|
154 |
EAlfAnchorOriginRight, EAlfAnchorOriginBottom,
|
|
155 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
156 |
TAlfTimedPoint( 0, -width ) );
|
|
157 |
|
|
158 |
// iBottom
|
|
159 |
iLayout->SetAnchor(
|
|
160 |
EAlfAnchorTopLeft, 2,
|
|
161 |
EAlfAnchorOriginLeft, EAlfAnchorOriginBottom,
|
|
162 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
163 |
TAlfTimedPoint( 0, -width ) );
|
|
164 |
iLayout->SetAnchor(
|
|
165 |
EAlfAnchorBottomRight, 2,
|
|
166 |
EAlfAnchorOriginRight, EAlfAnchorOriginBottom,
|
|
167 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
168 |
TAlfTimedPoint( 0, 0 ) );
|
|
169 |
|
|
170 |
iLayout->UpdateChildrenLayout();
|
|
171 |
}
|
|
172 |
|
|
173 |
// CUiCScrollBar
|
|
174 |
|
|
175 |
// ---------------------------------------------------------------------------
|
|
176 |
// CUiCScrollBar::NewL
|
|
177 |
// ---------------------------------------------------------------------------
|
|
178 |
//
|
|
179 |
CUiCScrollBar* CUiCScrollBar::NewL( CAlfEnv& aEnv, CAlfLayout* aParentLayout )
|
|
180 |
{
|
|
181 |
FUNC_LOG;
|
|
182 |
CUiCScrollBar* self = new (ELeave) CUiCScrollBar();
|
|
183 |
CleanupStack::PushL( self );
|
|
184 |
self->ConstructL( aEnv, aParentLayout );
|
|
185 |
CleanupStack::Pop(); // self
|
|
186 |
return self;
|
|
187 |
}
|
|
188 |
|
|
189 |
// ---------------------------------------------------------------------------
|
|
190 |
// CUiCScrollBar::~CUiCScrollBar
|
|
191 |
// ---------------------------------------------------------------------------
|
|
192 |
//
|
|
193 |
void CUiCScrollBar::Destroy()
|
|
194 |
{
|
|
195 |
FUNC_LOG;
|
|
196 |
delete this;
|
|
197 |
}
|
|
198 |
|
|
199 |
// ---------------------------------------------------------------------------
|
|
200 |
// CUiCScrollBar::Show
|
|
201 |
// ---------------------------------------------------------------------------
|
|
202 |
//
|
|
203 |
void CUiCScrollBar::Show( const TBool aShow )
|
|
204 |
{
|
|
205 |
FUNC_LOG;
|
|
206 |
Env().CancelCustomCommands( this );
|
|
207 |
TAlfTimedValue opacity( aShow ? KVisibleOpacity : 0 );
|
|
208 |
iDeck->SetOpacity( opacity );
|
|
209 |
if ( aShow )
|
|
210 |
{
|
|
211 |
iThumbVisual->Layout().SetOpacity( KVisibleOpacityThumb );
|
|
212 |
iBackGroundVisual->Layout().SetOpacity( KVisibleOpacityBackground );
|
|
213 |
TAlfCustomEventCommand command( EFadeOut, this );
|
|
214 |
Env().Send( command, KVisibleTimeout );
|
|
215 |
}
|
|
216 |
}
|
|
217 |
|
|
218 |
// ---------------------------------------------------------------------------
|
|
219 |
// CUiCScrollBar::UpdateModelL
|
|
220 |
// ---------------------------------------------------------------------------
|
|
221 |
//
|
|
222 |
void CUiCScrollBar::UpdateModelL( const TUiCScrollBarModel& aModel )
|
|
223 |
{
|
|
224 |
FUNC_LOG;
|
|
225 |
iModel = aModel;
|
|
226 |
if ( iModel.ScrollBarNeeded() )
|
|
227 |
{
|
|
228 |
SetThumbAnchors();
|
|
229 |
Show( ETrue );
|
|
230 |
}
|
|
231 |
else
|
|
232 |
{
|
|
233 |
Show( EFalse );
|
|
234 |
}
|
|
235 |
}
|
|
236 |
|
|
237 |
// ---------------------------------------------------------------------------
|
|
238 |
// CUiCScrollBar::ThumbPosition
|
|
239 |
// ---------------------------------------------------------------------------
|
|
240 |
//
|
|
241 |
TInt CUiCScrollBar::ThumbPosition() const
|
|
242 |
{
|
|
243 |
FUNC_LOG;
|
|
244 |
return iModel.ThumbPosition();
|
|
245 |
}
|
|
246 |
|
|
247 |
// ---------------------------------------------------------------------------
|
|
248 |
// CUiCScrollBar::SetRect
|
|
249 |
// ---------------------------------------------------------------------------
|
|
250 |
//
|
|
251 |
void CUiCScrollBar::SetRect( const TRect& aRect )
|
|
252 |
{
|
|
253 |
FUNC_LOG;
|
|
254 |
TAlfRealRect realRect( aRect );
|
|
255 |
iDeck->SetRect( realRect );
|
|
256 |
iDeck->UpdateChildrenLayout();
|
|
257 |
}
|
|
258 |
|
|
259 |
// ---------------------------------------------------------------------------
|
|
260 |
// CUiCScrollBar::Redraw
|
|
261 |
// ---------------------------------------------------------------------------
|
|
262 |
//
|
|
263 |
void CUiCScrollBar::Redraw()
|
|
264 |
{
|
|
265 |
FUNC_LOG;
|
|
266 |
}
|
|
267 |
|
|
268 |
// ---------------------------------------------------------------------------
|
|
269 |
// CUiCScrollBar::NotifyThemeChanged
|
|
270 |
// ---------------------------------------------------------------------------
|
|
271 |
//
|
|
272 |
void CUiCScrollBar::NotifyThemeChanged()
|
|
273 |
{
|
|
274 |
FUNC_LOG;
|
|
275 |
}
|
|
276 |
|
|
277 |
// ---------------------------------------------------------------------------
|
|
278 |
// CUiCScrollBar::LayoutHints
|
|
279 |
// ---------------------------------------------------------------------------
|
|
280 |
//
|
|
281 |
TInt CUiCScrollBar::LayoutHints() const
|
|
282 |
{
|
|
283 |
FUNC_LOG;
|
|
284 |
return ELayoutOnTopOfList | ELayoutRelativeToList |
|
|
285 |
ELayoutAutomaticMirroring;
|
|
286 |
}
|
|
287 |
|
|
288 |
// ---------------------------------------------------------------------------
|
|
289 |
// CUiCScrollBar::OfferEventL
|
|
290 |
// ---------------------------------------------------------------------------
|
|
291 |
//
|
|
292 |
TBool CUiCScrollBar::OfferEventL( const TAlfEvent& aEvent )
|
|
293 |
{
|
|
294 |
FUNC_LOG;
|
|
295 |
TBool handled( EFalse );
|
|
296 |
if ( aEvent.Type() == TAlfEvent::ETypeCustom )
|
|
297 |
{
|
|
298 |
if ( aEvent.CustomParameter() == EFadeOut )
|
|
299 |
{
|
|
300 |
handled = ETrue;
|
|
301 |
TAlfTimedValue opacity( 0, KFadeTimeout );
|
|
302 |
iDeck->SetOpacity( opacity );
|
|
303 |
}
|
|
304 |
}
|
|
305 |
else
|
|
306 |
{
|
|
307 |
handled = CAlfControl::OfferEventL( aEvent );
|
|
308 |
}
|
|
309 |
return handled;
|
|
310 |
}
|
|
311 |
|
|
312 |
// ---------------------------------------------------------------------------
|
|
313 |
// CUiCScrollBar::ProvideBitmapL
|
|
314 |
// ---------------------------------------------------------------------------
|
|
315 |
//
|
|
316 |
void CUiCScrollBar::ProvideBitmapL( TInt aId, CFbsBitmap*& aBitmap, CFbsBitmap*& aMaskBitmap )
|
|
317 |
{
|
|
318 |
FUNC_LOG;
|
|
319 |
TAknsItemID itemId;
|
|
320 |
|
|
321 |
switch ( aId )
|
|
322 |
{
|
|
323 |
case EThumbTop:
|
|
324 |
itemId = KAknsIIDQsnCpScrollHandleTop;
|
|
325 |
break;
|
|
326 |
|
|
327 |
case EThumbMiddle:
|
|
328 |
itemId = KAknsIIDQsnCpScrollHandleMiddle;
|
|
329 |
break;
|
|
330 |
|
|
331 |
case EThumbBottom:
|
|
332 |
itemId = KAknsIIDQsnCpScrollHandleBottom;
|
|
333 |
break;
|
|
334 |
|
|
335 |
case EBackgroundTop:
|
|
336 |
itemId = KAknsIIDQsnCpScrollBgTop;
|
|
337 |
break;
|
|
338 |
|
|
339 |
case EBackgroundMiddle:
|
|
340 |
itemId = KAknsIIDQsnCpScrollBgMiddle;
|
|
341 |
break;
|
|
342 |
|
|
343 |
case EBackgroundBottom:
|
|
344 |
itemId = KAknsIIDQsnCpScrollBgBottom;
|
|
345 |
break;
|
|
346 |
|
|
347 |
default:
|
|
348 |
User::Leave( KErrNotFound );
|
|
349 |
}
|
|
350 |
|
|
351 |
AknsUtils::CreateIconL( AknsUtils::SkinInstance(), itemId, aBitmap, aMaskBitmap, KNullDesC, -1, -1 );
|
|
352 |
|
|
353 |
if ( aBitmap )
|
|
354 |
{
|
|
355 |
const TInt width( ScrollBarWidth() );
|
|
356 |
|
|
357 |
TAknContentDimensions origDim;
|
|
358 |
AknIconUtils::GetContentDimensions( aBitmap, origDim );
|
|
359 |
TSize iconSize( origDim.iWidth, origDim.iHeight );
|
|
360 |
if (iconSize.iWidth != width && iconSize.iWidth > 0)
|
|
361 |
{
|
|
362 |
iconSize.iHeight = iconSize.iHeight * width / iconSize.iWidth;
|
|
363 |
iconSize.iWidth = width;
|
|
364 |
}
|
|
365 |
AknIconUtils::DisableCompression( aBitmap );
|
|
366 |
AknIconUtils::SetSize( aBitmap, iconSize, EAspectRatioNotPreserved );
|
|
367 |
if ( aMaskBitmap )
|
|
368 |
{
|
|
369 |
AknIconUtils::DisableCompression( aMaskBitmap );
|
|
370 |
AknIconUtils::SetSize( aMaskBitmap, iconSize, EAspectRatioNotPreserved );
|
|
371 |
}
|
|
372 |
}
|
|
373 |
}
|
|
374 |
|
|
375 |
// ---------------------------------------------------------------------------
|
|
376 |
// CUiCScrollBar::~CUiCScrollBar
|
|
377 |
// ---------------------------------------------------------------------------
|
|
378 |
//
|
|
379 |
CUiCScrollBar::~CUiCScrollBar()
|
|
380 |
{
|
|
381 |
FUNC_LOG;
|
|
382 |
Env().CancelCommands( this );
|
|
383 |
if ( iDeck )
|
|
384 |
{
|
|
385 |
iDeck->RemoveAndDestroyAllD();
|
|
386 |
}
|
|
387 |
delete iBackGroundVisual;
|
|
388 |
delete iThumbVisual;
|
|
389 |
}
|
|
390 |
|
|
391 |
// ---------------------------------------------------------------------------
|
|
392 |
// CUiCScrollBar::CUiCScrollBar
|
|
393 |
// ---------------------------------------------------------------------------
|
|
394 |
//
|
|
395 |
CUiCScrollBar::CUiCScrollBar()
|
|
396 |
{
|
|
397 |
FUNC_LOG;
|
|
398 |
}
|
|
399 |
|
|
400 |
// ---------------------------------------------------------------------------
|
|
401 |
// CUiCScrollBar::ConstructL
|
|
402 |
// ---------------------------------------------------------------------------
|
|
403 |
//
|
|
404 |
void CUiCScrollBar::ConstructL( CAlfEnv& aEnv, CAlfLayout* aParentLayout )
|
|
405 |
{
|
|
406 |
FUNC_LOG;
|
|
407 |
CAlfControl::ConstructL( aEnv );
|
|
408 |
iDeck = CAlfDeckLayout::AddNewL( *this, aParentLayout );
|
|
409 |
iDeck->SetFlags( EAlfVisualFlagManualLayout |
|
|
410 |
EAlfVisualFlagAutomaticLocaleMirroringEnabled );
|
|
411 |
iBgLayout = CAlfAnchorLayout::AddNewL( *this, iDeck );
|
|
412 |
iBgLayout->SetFlags( EAlfVisualFlagAutomaticLocaleMirroringEnabled );
|
|
413 |
iBackGroundVisual = CUiCCompositeImage::NewL( *this, iBgLayout,
|
|
414 |
Env().TextureManager().CreateTextureL( EBackgroundTop, this, EAlfTextureFlagSkinContent ),
|
|
415 |
Env().TextureManager().CreateTextureL( EBackgroundMiddle, this, EAlfTextureFlagSkinContent ),
|
|
416 |
Env().TextureManager().CreateTextureL( EBackgroundBottom, this, EAlfTextureFlagSkinContent ) );
|
|
417 |
iThumbLayout = CAlfAnchorLayout::AddNewL( *this, iDeck );
|
|
418 |
iThumbLayout->SetFlags( EAlfVisualFlagAutomaticLocaleMirroringEnabled );
|
|
419 |
iThumbLayout->SetClipping( ETrue );
|
|
420 |
iThumbVisual = CUiCCompositeImage::NewL( *this, iThumbLayout,
|
|
421 |
Env().TextureManager().CreateTextureL( EThumbTop, this, EAlfTextureFlagSkinContent ),
|
|
422 |
Env().TextureManager().CreateTextureL( EThumbMiddle, this, EAlfTextureFlagSkinContent ),
|
|
423 |
Env().TextureManager().CreateTextureL( EThumbBottom, this, EAlfTextureFlagSkinContent ) );
|
|
424 |
iThumbVisual->Layout().SetFlags( EAlfVisualFlagDrawAfterOthers );
|
|
425 |
SetAnchors();
|
|
426 |
}
|
|
427 |
|
|
428 |
// ---------------------------------------------------------------------------
|
|
429 |
// CUiCScrollBar::ConstructL
|
|
430 |
// ---------------------------------------------------------------------------
|
|
431 |
//
|
|
432 |
void CUiCScrollBar::SetAnchors()
|
|
433 |
{
|
|
434 |
FUNC_LOG;
|
|
435 |
SetBgAnchors();
|
|
436 |
SetThumbAnchors();
|
|
437 |
}
|
|
438 |
|
|
439 |
// ---------------------------------------------------------------------------
|
|
440 |
// CUiCScrollBar::SetBgAnchors
|
|
441 |
// ---------------------------------------------------------------------------
|
|
442 |
//
|
|
443 |
void CUiCScrollBar::SetBgAnchors()
|
|
444 |
{
|
|
445 |
FUNC_LOG;
|
|
446 |
iBgLayout->SetAnchor(
|
|
447 |
EAlfAnchorTopLeft, 0,
|
|
448 |
EAlfAnchorOriginRight, EAlfAnchorOriginTop,
|
|
449 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
450 |
TAlfTimedPoint( -ScrollBarWidth(), 0 ) );
|
|
451 |
iBgLayout->SetAnchor(
|
|
452 |
EAlfAnchorBottomRight, 0,
|
|
453 |
EAlfAnchorOriginRight, EAlfAnchorOriginBottom,
|
|
454 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
455 |
TAlfTimedPoint( 0, 0 ) );
|
|
456 |
iBgLayout->UpdateChildrenLayout();
|
|
457 |
}
|
|
458 |
|
|
459 |
// ---------------------------------------------------------------------------
|
|
460 |
// CUiCScrollBar::SetThumbAnchors
|
|
461 |
// ---------------------------------------------------------------------------
|
|
462 |
//
|
|
463 |
void CUiCScrollBar::SetThumbAnchors()
|
|
464 |
{
|
|
465 |
FUNC_LOG;
|
|
466 |
iThumbLayout->SetAnchor(
|
|
467 |
EAlfAnchorTopLeft, 0,
|
|
468 |
EAlfAnchorOriginRight, EAlfAnchorOriginTop,
|
|
469 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
470 |
TAlfTimedPoint( -ScrollBarWidth(), iModel.ThumbPosition() ) );
|
|
471 |
iThumbLayout->SetAnchor(
|
|
472 |
EAlfAnchorBottomRight, 0,
|
|
473 |
EAlfAnchorOriginRight, EAlfAnchorOriginTop,
|
|
474 |
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
|
|
475 |
TAlfTimedPoint( 0, iModel.ThumbPosition() + iModel.ThumbHeight() ) );
|
|
476 |
iThumbLayout->UpdateChildrenLayout();
|
|
477 |
}
|
|
478 |
|
|
479 |
// end of file
|