diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-12 13:08:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-12 13:54:15 +0100 |
commit | 84e1368bd8014f418b575239cd16c11704123e8d (patch) | |
tree | 50648f07cd49b749634d94adc5ebe0a0ec25e780 /extensions | |
parent | 0cab72b8191dc8ee5941fc5900d0c3b2c48fd0f3 (diff) |
more the png into the .ui so it isn't garbage collected
Change-Id: If0d3829bfc14c602a0167967cbe215782c75f549
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/scanner/grid.cxx | 8 | ||||
-rw-r--r-- | extensions/uiconfig/scanner/ui/griddialog.ui | 14 |
2 files changed, 17 insertions, 5 deletions
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index ae3695494d71..88a09b32fa0c 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -119,7 +119,7 @@ class GridWindow : public Window void drawLine( double x1, double y1, double x2, double y2 ); public: GridWindow(Window* pParent); - void Init(double* pXValues, double* pYValues, int nValues, bool bCutValues); + void Init(double* pXValues, double* pYValues, int nValues, bool bCutValues, const BitmapEx &rMarkerBitmap); virtual ~GridWindow(); void setBoundings( double fMinX, double fMinY, double fMaxX, double fMaxY ); @@ -159,13 +159,13 @@ GridWindow::GridWindow(Window* pParent) , m_bCutValues(false) , m_aHandles() , m_nDragIndex(0xffffffff) - , m_aMarkerBitmap( FixedImage::loadThemeImage("extensions/source/scanner/handle.png").GetBitmapEx() ) { SetMapMode(MapMode(MAP_PIXEL)); } -void GridWindow::Init(double* pXValues, double* pYValues, int nValues, bool bCutValues) +void GridWindow::Init(double* pXValues, double* pYValues, int nValues, bool bCutValues, const BitmapEx &rMarkerBitmap) { + m_aMarkerBitmap = rMarkerBitmap; m_pXValues = pXValues; m_pOrigYValues = pYValues; m_nValues = nValues; @@ -214,7 +214,7 @@ GridDialog::GridDialog(double* pXValues, double* pYValues, int nValues, Window* get(m_pResetTypeBox, "resetTypeCombobox"); get(m_pResetButton, "resetButton"); get(m_pGridWindow, "gridwindow"); - m_pGridWindow->Init(pXValues, pYValues, nValues, bCutValues); + m_pGridWindow->Init(pXValues, pYValues, nValues, bCutValues, get<FixedImage>("handle")->GetImage().GetBitmapEx()); m_pResetTypeBox->SelectEntryPos( 0 ); diff --git a/extensions/uiconfig/scanner/ui/griddialog.ui b/extensions/uiconfig/scanner/ui/griddialog.ui index 25638a5e43d1..baebe9f10e3a 100644 --- a/extensions/uiconfig/scanner/ui/griddialog.ui +++ b/extensions/uiconfig/scanner/ui/griddialog.ui @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- Generated with glade 3.16.1 --> <interface> - <!-- interface-requires LibreOffice 1.0 --> <requires lib="gtk+" version="3.0"/> + <!-- interface-requires LibreOffice 1.0 --> <object class="GtkDialog" id="GridDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> @@ -80,6 +80,18 @@ <property name="position">3</property> </packing> </child> + <child> + <object class="GtkImage" id="handle"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="pixbuf">extensions/source/scanner/handle.png</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> |