Skip to content

Commit

Permalink
(Upstream) LVDocView: remove unused NavigationBar code
Browse files Browse the repository at this point in the history
  • Loading branch information
poire-z committed Aug 27, 2021
1 parent 22a8960 commit 58839e2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
8 changes: 0 additions & 8 deletions crengine/include/lvdocview.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,6 @@ class LVDocView : public CacheLoadingCallback
void updateDocStyleSheet();

protected:


virtual void drawNavigationBar( LVDrawBuf * drawbuf, int pageIndex, int percent );

virtual void getNavigationBarRectangle( lvRect & rc );

virtual void getNavigationBarRectangle( int pageIndex, lvRect & rc );

/// returns document offset for next page
int getNextPageOffset();
/// returns document offset for previous page
Expand Down
28 changes: 0 additions & 28 deletions crengine/src/lvdocview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1648,31 +1648,6 @@ void LVDocView::getPageRectangle(int pageIndex, lvRect & pageRect, bool mergeTwo
}
}

void LVDocView::getNavigationBarRectangle(lvRect & navRect) {
getNavigationBarRectangle(getVisiblePageCount() == 2 ? 1 : 2, navRect);
}

void LVDocView::getNavigationBarRectangle(int pageIndex, lvRect & navRect) {
lvRect headerRect;
getPageHeaderRectangle(pageIndex, headerRect);
navRect = headerRect;
if (headerRect.bottom <= headerRect.top)
return;
navRect.top = navRect.bottom - 6;
}

void LVDocView::drawNavigationBar(LVDrawBuf * drawbuf, int pageIndex,
int percent) {
CR_UNUSED2(drawbuf, percent);
//LVArray<int> & sbounds = getSectionBounds();
lvRect navBar;
getNavigationBarRectangle(pageIndex, navBar);
//bool leftPage = (getVisiblePageCount()==2 && !(pageIndex&1) );

//lUInt32 cl1 = 0xA0A0A0;
//lUInt32 cl2 = getBackgroundColor();
}

/// sets battery state
bool LVDocView::setBatteryState(int newState) {
if (m_battery_state == newState)
Expand Down Expand Up @@ -1736,9 +1711,6 @@ void LVDocView::drawPageHeader(LVDrawBuf * drawbuf, const lvRect & headerRc,
int percent_pos = /*info.left + */percent * info.width() / 10000;
// int gh = 3; //drawGauge ? 3 : 1;
LVArray<int> & sbounds = getSectionBounds();
// NavBar no longer used:
// lvRect navBar;
// getNavigationBarRectangle(pageIndex, navBar);
int gpos = info.bottom;
// if (drawbuf->GetBitsPerPixel() <= 2) {
// // gray
Expand Down

0 comments on commit 58839e2

Please sign in to comment.