summaryrefslogtreecommitdiff
path: root/wx+/grid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wx+/grid.cpp')
-rw-r--r--wx+/grid.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/wx+/grid.cpp b/wx+/grid.cpp
index 9d896dc2..d357b3c1 100644
--- a/wx+/grid.cpp
+++ b/wx+/grid.cpp
@@ -26,8 +26,8 @@
using namespace zen;
-wxColor zen::getColorSelectionGradientFrom() { return { 137, 172, 255 }; } //blue: HSL: 158, 255, 196 HSV: 222, 0.46, 1
-wxColor zen::getColorSelectionGradientTo () { return { 225, 234, 255 }; } // HSL: 158, 255, 240 HSV: 222, 0.12, 1
+wxColor Grid::getColorSelectionGradientFrom() { return { 137, 172, 255 }; } //blue: HSL: 158, 255, 196 HSV: 222, 0.46, 1
+wxColor Grid::getColorSelectionGradientTo () { return { 225, 234, 255 }; } // HSL: 158, 255, 240 HSV: 222, 0.12, 1
const int GridData::COLUMN_GAP_LEFT = 4;
@@ -51,7 +51,7 @@ inline wxColor getColorLabelGradientFrom() { return wxSystemSettings::GetColour(
inline wxColor getColorLabelGradientTo () { return { 200, 200, 200 }; } //light grey
inline wxColor getColorLabelGradientFocusFrom() { return getColorLabelGradientFrom(); }
-inline wxColor getColorLabelGradientFocusTo () { return getColorSelectionGradientFrom(); }
+inline wxColor getColorLabelGradientFocusTo () { return Grid::getColorSelectionGradientFrom(); }
const double MOUSE_DRAG_ACCELERATION = 1.5; //unit: [rows / (pixel * sec)] -> same value like Explorer!
const int DEFAULT_COL_LABEL_BORDER = 6; //top + bottom border in addition to label height
@@ -113,7 +113,7 @@ void GridData::drawCellBackground(wxDC& dc, const wxRect& rect, bool enabled, bo
if (enabled)
{
if (selected)
- dc.GradientFillLinear(rect, getColorSelectionGradientFrom(), getColorSelectionGradientTo(), wxEAST);
+ dc.GradientFillLinear(rect, Grid::getColorSelectionGradientFrom(), Grid::getColorSelectionGradientTo(), wxEAST);
else
clearArea(dc, rect, backgroundColor);
}
@@ -122,7 +122,7 @@ void GridData::drawCellBackground(wxDC& dc, const wxRect& rect, bool enabled, bo
}
-void GridData::drawCellText(wxDC& dc, const wxRect& rect, const std::wstring& text, int alignment)
+wxSize GridData::drawCellText(wxDC& dc, const wxRect& rect, const std::wstring& text, int alignment)
{
/*
performance notes (Windows):
@@ -187,6 +187,7 @@ void GridData::drawCellText(wxDC& dc, const wxRect& rect, const std::wstring& te
RecursiveDcClipper clip(dc, rect);
dc.DrawText(textTrunc, pt);
+ return extentTrunc;
}
bgstack15