Skip to content

Commit

Permalink
Merge pull request #34 from baranovskiykonstantin/softkeys_fix
Browse files Browse the repository at this point in the history
Do not hide softkeys at orientation changing.
  • Loading branch information
artem78 authored Jul 31, 2021
2 parents 2bbb241 + 8518592 commit 75a93bc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions inc/S60MapsAppView.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ class CS60MapsAppView : public CCoeControlWithDelayedDraw
TS60MapsMovement iMovement;
CPeriodic* iMovementRepeater;

TBool iIsSoftkeysShown;

void Move(const TPoint &aPoint, TBool savePos = ETrue); // Used by all another Move methods
public:
void Move(const TCoordinate &aPos);
Expand Down Expand Up @@ -227,6 +229,8 @@ class CS60MapsAppView : public CCoeControlWithDelayedDraw
inline TBool IsFollowingUser()
{ return iIsFollowUser; };
void SetTileProviderL(TTileProvider* aTileProvider);
inline TBool IsSoftkeysShown()
{ return iIsSoftkeysShown; };

};

Expand Down
11 changes: 9 additions & 2 deletions src/S60MapsAppUi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ void CS60MapsAppUi::HandleCommandL(TInt aCommand)
break;
}
}

// -----------------------------------------------------------------------------
// Called by the framework when the application status pane
// size is changed. Passes the new client rectangle to the
Expand All @@ -283,8 +284,14 @@ void CS60MapsAppUi::HandleCommandL(TInt aCommand)
//
void CS60MapsAppUi::HandleStatusPaneSizeChange()
{
//iAppView->SetRect(ClientRect());
iAppView->SetRect(ApplicationRect());
if (iAppView->IsSoftkeysShown())
{
iAppView->SetRect(ClientRect());
}
else
{
iAppView->SetRect(ApplicationRect());
}
}

CArrayFix<TCoeHelpContext>* CS60MapsAppUi::HelpContextL() const
Expand Down
5 changes: 4 additions & 1 deletion src/S60MapsAppView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ void CS60MapsAppView::ConstructL(const TRect& aRect, const TCoordinate &aInitial
// -----------------------------------------------------------------------------
//
CS60MapsAppView::CS60MapsAppView(TZoom aInitialZoom) :
iZoom(aInitialZoom)
iZoom(aInitialZoom),
iIsSoftkeysShown(EFalse)
// Position will be set later in ConstructL
{
// No implementation required
Expand Down Expand Up @@ -320,10 +321,12 @@ void CS60MapsAppView::HandlePointerEventL(const TPointerEvent& aPointerEvent)
if (posDelta.iY < 0)
{
SetRect(iAvkonAppUi->ClientRect());
iIsSoftkeysShown = ETrue;
}
else
{
SetRect(iAvkonAppUi->ApplicationRect());
iIsSoftkeysShown = EFalse;
}
}
else
Expand Down

0 comments on commit 75a93bc

Please sign in to comment.