Skip to content

Commit 31eb79a

Browse files
plotnvirxkane
authored andcommitted
galaxy 9 support - rounded corners, forgotten
1 parent 374a1fd commit 31eb79a

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

crengine/include/lvdocviewprops.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#define PROP_PAGE_MARGIN_BOTTOM "crengine.page.margin.bottom"
2525
#define PROP_PAGE_MARGIN_LEFT "crengine.page.margin.left"
2626
#define PROP_PAGE_MARGIN_RIGHT "crengine.page.margin.right"
27+
#define PROP_ROUNDED_CORNERS_MARGIN "crengine.rounded.corners.margin"
2728
#define PROP_PAGE_VIEW_MODE "crengine.page.view.mode" // pages/scroll
2829
#define PROP_INTERLINE_SPACE "crengine.interline.space"
2930
#if CR_INTERNAL_PAGE_ORIENTATION==1

crengine/src/lvdocview.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,9 @@ void LVDocView::drawPageHeader(LVDrawBuf * drawbuf, const lvRect & headerRc,
16031603
drawbuf->SetClipRect(&hrc);
16041604
bool drawGauge = true;
16051605
lvRect info = headerRc;
1606+
info.left = info.left + m_props->getIntDef(PROP_ROUNDED_CORNERS_MARGIN, 0);
1607+
info.right = info.right - m_props->getIntDef(PROP_ROUNDED_CORNERS_MARGIN, 0);;
1608+
16061609
// if ( m_statusColor!=0xFF000000 ) {
16071610
// CRLog::trace("Status color = %06x, textColor=%06x", m_statusColor, getTextColor());
16081611
// } else {
@@ -5698,7 +5701,10 @@ void LVDocView::propsUpdateDefaults(CRPropRef props) {
56985701
props->limitValueList(PROP_PAGE_MARGIN_BOTTOM, def_margin, sizeof(def_margin)/sizeof(int));
56995702
props->limitValueList(PROP_PAGE_MARGIN_LEFT, def_margin, sizeof(def_margin)/sizeof(int));
57005703
props->limitValueList(PROP_PAGE_MARGIN_RIGHT, def_margin, sizeof(def_margin)/sizeof(int));
5701-
static int def_updates[] = { 1, 0, 2, 3, 4, 5, 6, 7, 8, 10, 14 };
5704+
static int def_rounded_corners_margin[] = {0, 5, 10, 15, 20, 30, 40, 50, 60, 70,80, 90, 100, 120, 140, 160};
5705+
props->limitValueList(PROP_ROUNDED_CORNERS_MARGIN, def_rounded_corners_margin, sizeof(def_rounded_corners_margin)/sizeof(int));
5706+
5707+
static int def_updates[] = { 1, 0, 2, 3, 4, 5, 6, 7, 8, 10, 14 };
57025708
props->limitValueList(PROP_DISPLAY_FULL_UPDATE_INTERVAL, def_updates, 11);
57035709
int fs = props->getIntDef(PROP_STATUS_FONT_SIZE, INFO_FONT_SIZE);
57045710
if (fs < MIN_STATUS_FONT_SIZE)

0 commit comments

Comments
 (0)