Line
Link Here
|
|
Based on partial patch by dam. |
|
Based on partial patch by dam. |
1 |
-- a/src/ListView.h |
1 |
++ b/src/ListView.h |
Lines 28-33
Link Here
|
28 |
#include <wx/scrolwin.h> |
28 |
#include <wx/scrolwin.h> |
29 |
#include <wx/vlbox.h> |
29 |
#include <wx/vlbox.h> |
30 |
#include <wx/settings.h> |
30 |
#include <wx/settings.h> |
|
|
31 |
#include <wx/listbase.h> |
31 |
|
32 |
|
32 |
class guListViewClient; |
33 |
class guListViewClient; |
33 |
class guListViewHeader; |
34 |
class guListViewHeader; |
Lines 330-336
Link Here
|
330 |
size_t GetVisibleEnd( void ) const { return m_ListBox->GetVisibleEnd(); } |
331 |
size_t GetVisibleEnd( void ) const { return m_ListBox->GetVisibleEnd(); } |
331 |
size_t GetFirstVisibleLine() const { return m_ListBox->GetFirstVisibleLine(); } |
332 |
size_t GetFirstVisibleLine() const { return m_ListBox->GetFirstVisibleLine(); } |
332 |
size_t GetLastVisibleLine() const { return m_ListBox->GetLastVisibleLine(); } |
333 |
size_t GetLastVisibleLine() const { return m_ListBox->GetLastVisibleLine(); } |
333 |
bool ScrollLines( int lines ) { return m_ListBox->ScrollLines( lines ); } |
334 |
bool ScrollLines( int lines ) { return m_ListBox->wxWindow::ScrollLines( lines ); } |
334 |
|
335 |
|
335 |
bool ScrollToLine( size_t line ) { return m_ListBox->ScrollToLine( line ); } |
336 |
bool ScrollToLine( size_t line ) { return m_ListBox->ScrollToLine( line ); } |
336 |
|
337 |
|
337 |
-- a/src/FileBrowser.cpp |
338 |
++ b/src/FileBrowser.cpp |
Lines 36-41
Link Here
|
36 |
#include <wx/arrimpl.cpp> |
36 |
#include <wx/arrimpl.cpp> |
37 |
#include <wx/artprov.h> |
37 |
#include <wx/artprov.h> |
38 |
#include <wx/clipbrd.h> |
38 |
#include <wx/clipbrd.h> |
|
|
39 |
#include <wx/gtk/tglbtn.h> |
39 |
|
40 |
|
40 |
WX_DEFINE_OBJARRAY(guFileItemArray); |
41 |
WX_DEFINE_OBJARRAY(guFileItemArray); |
41 |
|
42 |
|
Lines 221-227
Link Here
|
221 |
|
222 |
|
222 |
DirBtnSizer->Add( 0, 0, 1, wxEXPAND, 5 ); |
223 |
DirBtnSizer->Add( 0, 0, 1, wxEXPAND, 5 ); |
223 |
|
224 |
|
224 |
m_ShowLibPathsBtn = new wxToggleBitmapButton( this, wxID_ANY, guImage( guIMAGE_INDEX_tiny_library ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
225 |
m_ShowLibPathsBtn = new wxBitmapToggleButton( this, wxID_ANY, guImage( guIMAGE_INDEX_tiny_library ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); |
225 |
m_ShowLibPathsBtn->SetToolTip( ShowPaths == guFILEBROWSER_SHOWPATH_SYSTEM ? |
226 |
m_ShowLibPathsBtn->SetToolTip( ShowPaths == guFILEBROWSER_SHOWPATH_SYSTEM ? |
226 |
_( "See used locations" ) : |
227 |
_( "See used locations" ) : |
227 |
_( "See system files" ) ); |
228 |
_( "See system files" ) ); |
228 |
-- a/src/FileBrowser.h |
229 |
++ b/src/FileBrowser.h |
Lines 36-41
Link Here
|
36 |
#include <wx/sizer.h> |
36 |
#include <wx/sizer.h> |
37 |
#include <wx/string.h> |
37 |
#include <wx/string.h> |
38 |
#include <wx/tglbtn.h> |
38 |
#include <wx/tglbtn.h> |
|
|
39 |
#include <wx/gtk/tglbtn.h> |
39 |
|
40 |
|
40 |
|
41 |
|
41 |
#define guPANEL_FILEBROWSER_DIRCTRL ( 1 << 0 ) |
42 |
#define guPANEL_FILEBROWSER_DIRCTRL ( 1 << 0 ) |
Lines 122-128
Link Here
|
122 |
guMediaViewer * m_MediaViewer; |
123 |
guMediaViewer * m_MediaViewer; |
123 |
guGenericDirCtrl * m_DirCtrl; |
124 |
guGenericDirCtrl * m_DirCtrl; |
124 |
bool m_AddingFolder; |
125 |
bool m_AddingFolder; |
125 |
wxToggleBitmapButton * m_ShowLibPathsBtn; |
126 |
wxBitmapToggleButton * m_ShowLibPathsBtn; |
126 |
|
127 |
|
127 |
void OnShowLibPathsClick( wxCommandEvent& event ); |
128 |
void OnShowLibPathsClick( wxCommandEvent& event ); |
128 |
|
129 |
|
129 |
-- a/src/AuiNotebook.cpp |
130 |
++ b/src/AuiNotebook.cpp |
Lines 47-54
Link Here
|
47 |
m_TextFgColor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); |
47 |
m_TextFgColor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); |
48 |
m_SelTextFgColour = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); |
48 |
m_SelTextFgColour = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); |
49 |
|
49 |
|
50 |
m_disabled_close_bmp = guImage( guIMAGE_INDEX_tiny_close_normal ); |
50 |
m_disabledCloseBmp = guImage( guIMAGE_INDEX_tiny_close_normal ); |
51 |
m_active_close_bmp = guImage( guIMAGE_INDEX_tiny_close_highlight ); |
51 |
m_activeCloseBmp = guImage( guIMAGE_INDEX_tiny_close_highlight ); |
52 |
} |
52 |
} |
53 |
|
53 |
|
54 |
// -------------------------------------------------------------------------------- // |
54 |
// -------------------------------------------------------------------------------- // |
Lines 60-68
Link Here
|
60 |
wxAuiTabArt * guAuiTabArt::Clone() |
60 |
wxAuiTabArt * guAuiTabArt::Clone() |
61 |
{ |
61 |
{ |
62 |
guAuiTabArt * art = new guAuiTabArt; |
62 |
guAuiTabArt * art = new guAuiTabArt; |
63 |
art->SetNormalFont( m_normal_font ); |
63 |
art->SetNormalFont( m_normalFont ); |
64 |
art->SetSelectedFont( m_selected_font ); |
64 |
art->SetSelectedFont( m_selectedFont ); |
65 |
art->SetMeasuringFont( m_measuring_font ); |
65 |
art->SetMeasuringFont( m_measuringFont ); |
66 |
// art->m_BgColor = m_BgColor; |
66 |
// art->m_BgColor = m_BgColor; |
67 |
// art->m_SelBgColor = m_SelBgColor; |
67 |
// art->m_SelBgColor = m_SelBgColor; |
68 |
// art->m_TextFgColor = m_TextFgColor; |
68 |
// art->m_TextFgColor = m_TextFgColor; |
Lines 75-81
Link Here
|
75 |
// draw background |
75 |
// draw background |
76 |
//wxColor top_color = m_base_colour; |
76 |
//wxColor top_color = m_base_colour; |
77 |
wxColor top_color = m_BgColor; |
77 |
wxColor top_color = m_BgColor; |
78 |
wxColor bottom_color = wxAuiStepColour( m_base_colour, 120 ); |
78 |
wxColor bottom_color = wxAuiStepColour( m_baseColour, 120 ); |
79 |
wxRect r; |
79 |
wxRect r; |
80 |
|
80 |
|
81 |
if( m_flags & wxAUI_NB_BOTTOM ) |
81 |
if( m_flags & wxAUI_NB_BOTTOM ) |
Lines 88-94
Link Here
|
88 |
dc.GradientFillLinear( r, top_color, bottom_color, wxNORTH ); |
88 |
dc.GradientFillLinear( r, top_color, bottom_color, wxNORTH ); |
89 |
|
89 |
|
90 |
// draw base lines |
90 |
// draw base lines |
91 |
dc.SetPen( m_border_pen ); |
91 |
dc.SetPen( m_borderPen ); |
92 |
int y = rect.GetHeight(); |
92 |
int y = rect.GetHeight(); |
93 |
int w = rect.GetWidth(); |
93 |
int w = rect.GetWidth(); |
94 |
|
94 |
|
Lines 120-129
Link Here
|
120 |
if( caption.empty() ) |
120 |
if( caption.empty() ) |
121 |
caption = wxT("Xj"); |
121 |
caption = wxT("Xj"); |
122 |
|
122 |
|
123 |
dc.SetFont(m_selected_font); |
123 |
dc.SetFont(m_selectedFont); |
124 |
dc.GetTextExtent(caption, &selected_textx, &selected_texty); |
124 |
dc.GetTextExtent(caption, &selected_textx, &selected_texty); |
125 |
|
125 |
|
126 |
dc.SetFont(m_normal_font); |
126 |
dc.SetFont(m_normalFont); |
127 |
dc.GetTextExtent(caption, &normal_textx, &normal_texty); |
127 |
dc.GetTextExtent(caption, &normal_textx, &normal_texty); |
128 |
|
128 |
|
129 |
// figure out the size of the tab |
129 |
// figure out the size of the tab |
Lines 135-141
Link Here
|
135 |
close_button_state, |
135 |
close_button_state, |
136 |
x_extent); |
136 |
x_extent); |
137 |
|
137 |
|
138 |
wxCoord tab_height = m_tab_ctrl_height - 1; |
138 |
wxCoord tab_height = m_tabCtrlHeight - 1; |
139 |
if( !page.active ) |
139 |
if( !page.active ) |
140 |
tab_height -= 2; |
140 |
tab_height -= 2; |
141 |
wxCoord tab_width = tab_size.x; |
141 |
wxCoord tab_width = tab_size.x; |
Lines 150-161
Link Here
|
150 |
|
150 |
|
151 |
if( page.active ) |
151 |
if( page.active ) |
152 |
{ |
152 |
{ |
153 |
dc.SetFont( m_selected_font ); |
153 |
dc.SetFont( m_selectedFont ); |
154 |
texty = selected_texty; |
154 |
texty = selected_texty; |
155 |
} |
155 |
} |
156 |
else |
156 |
else |
157 |
{ |
157 |
{ |
158 |
dc.SetFont(m_normal_font); |
158 |
dc.SetFont(m_normalFont); |
159 |
texty = normal_texty; |
159 |
texty = normal_texty; |
160 |
} |
160 |
} |
161 |
|
161 |
|
Lines 221-227
Link Here
|
221 |
// } |
221 |
// } |
222 |
|
222 |
|
223 |
// draw tab outline |
223 |
// draw tab outline |
224 |
dc.SetPen( m_border_pen ); |
224 |
dc.SetPen( m_borderPen ); |
225 |
dc.SetBrush( * wxTRANSPARENT_BRUSH ); |
225 |
dc.SetBrush( * wxTRANSPARENT_BRUSH ); |
226 |
dc.DrawPolygon( WXSIZEOF( border_points ), border_points ); |
226 |
dc.DrawPolygon( WXSIZEOF( border_points ), border_points ); |
227 |
|
227 |
|
Lines 230-236
Link Here
|
230 |
if( page.active ) |
230 |
if( page.active ) |
231 |
{ |
231 |
{ |
232 |
if( m_flags & wxAUI_NB_BOTTOM ) |
232 |
if( m_flags & wxAUI_NB_BOTTOM ) |
233 |
dc.SetPen( wxPen( wxColour( wxAuiStepColour( m_base_colour, 170 ) ) ) ); |
233 |
dc.SetPen( wxPen( wxColour( wxAuiStepColour( m_baseColour, 170 ) ) ) ); |
234 |
// TODO: else if (m_flags &wxAUI_NB_LEFT) {} |
234 |
// TODO: else if (m_flags &wxAUI_NB_LEFT) {} |
235 |
// TODO: else if (m_flags &wxAUI_NB_RIGHT) {} |
235 |
// TODO: else if (m_flags &wxAUI_NB_RIGHT) {} |
236 |
else //for wxAUI_NB_TOP |
236 |
else //for wxAUI_NB_TOP |
Lines 246-252
Link Here
|
246 |
int close_button_width = 0; |
246 |
int close_button_width = 0; |
247 |
if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) |
247 |
if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) |
248 |
{ |
248 |
{ |
249 |
close_button_width = m_active_close_bmp.GetWidth(); |
249 |
close_button_width = m_activeCloseBmp.GetWidth(); |
250 |
} |
250 |
} |
251 |
|
251 |
|
252 |
|
252 |
|
Lines 284-295
Link Here
|
284 |
// draw close button if necessary |
284 |
// draw close button if necessary |
285 |
if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) |
285 |
if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) |
286 |
{ |
286 |
{ |
287 |
wxBitmap bmp = m_disabled_close_bmp; |
287 |
wxBitmap bmp = m_disabledCloseBmp; |
288 |
|
288 |
|
289 |
if (close_button_state == wxAUI_BUTTON_STATE_HOVER || |
289 |
if (close_button_state == wxAUI_BUTTON_STATE_HOVER || |
290 |
close_button_state == wxAUI_BUTTON_STATE_PRESSED) |
290 |
close_button_state == wxAUI_BUTTON_STATE_PRESSED) |
291 |
{ |
291 |
{ |
292 |
bmp = m_active_close_bmp; |
292 |
bmp = m_activeCloseBmp; |
293 |
} |
293 |
} |
294 |
|
294 |
|
295 |
wxRect rect(tab_x + tab_width - close_button_width - 1, |
295 |
wxRect rect(tab_x + tab_width - close_button_width - 1, |
Lines 367-380
Link Here
|
367 |
// UpdateTabCtrlHeight() does the actual tab resizing. It's meant |
367 |
// UpdateTabCtrlHeight() does the actual tab resizing. It's meant |
368 |
// to be used interally |
368 |
// to be used interally |
369 |
// -------------------------------------------------------------------------------- // |
369 |
// -------------------------------------------------------------------------------- // |
370 |
void guAuiNotebook::UpdateTabCtrlHeight() |
370 |
bool guAuiNotebook::UpdateTabCtrlHeight() |
371 |
{ |
371 |
{ |
372 |
// get the tab ctrl height we will use |
372 |
// get the tab ctrl height we will use |
373 |
int height = CalculateTabCtrlHeight(); |
373 |
int height = CalculateTabCtrlHeight(); |
374 |
|
374 |
|
375 |
wxAuiTabArt* art = m_tabs.GetArtProvider(); |
375 |
wxAuiTabArt* art = m_tabs.GetArtProvider(); |
376 |
|
376 |
|
377 |
m_tab_ctrl_height = height; |
377 |
m_tabCtrlHeight = height; |
378 |
|
378 |
|
379 |
wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes(); |
379 |
wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes(); |
380 |
size_t i, pane_count = all_panes.GetCount(); |
380 |
size_t i, pane_count = all_panes.GetCount(); |
Lines 385-394
Link Here
|
385 |
continue; |
385 |
continue; |
386 |
wxTabFrame* tab_frame = (wxTabFrame*)pane.window; |
386 |
wxTabFrame* tab_frame = (wxTabFrame*)pane.window; |
387 |
wxAuiTabCtrl* tabctrl = tab_frame->m_tabs; |
387 |
wxAuiTabCtrl* tabctrl = tab_frame->m_tabs; |
388 |
tab_frame->SetTabCtrlHeight(m_tab_ctrl_height); |
388 |
tab_frame->SetTabCtrlHeight(m_tabCtrlHeight); |
389 |
tabctrl->SetArtProvider(art->Clone()); |
389 |
tabctrl->SetArtProvider(art->Clone()); |
390 |
tab_frame->DoSizing(); |
390 |
tab_frame->DoSizing(); |
391 |
} |
391 |
} |
|
|
392 |
|
393 |
return true; |
392 |
} |
394 |
} |
393 |
|
395 |
|
394 |
// -------------------------------------------------------------------------------- // |
396 |
// -------------------------------------------------------------------------------- // |
Lines 447-453
Link Here
|
447 |
if( p ) |
449 |
if( p ) |
448 |
tabs += wxT( "," ); |
450 |
tabs += wxT( "," ); |
449 |
|
451 |
|
450 |
if( ( int ) page_idx == m_curpage ) |
452 |
if( ( int ) page_idx == m_curPage ) |
451 |
tabs += wxT( "*" ); |
453 |
tabs += wxT( "*" ); |
452 |
else if( ( int ) p == tabframe->m_tabs->GetActivePage() ) |
454 |
else if( ( int ) p == tabframe->m_tabs->GetActivePage() ) |
453 |
tabs += wxT( "+" ); |
455 |
tabs += wxT( "+" ); |
Lines 501-512
Link Here
|
501 |
// create a new tab frame |
503 |
// create a new tab frame |
502 |
wxTabFrame * new_tabs = new wxTabFrame; |
504 |
wxTabFrame * new_tabs = new wxTabFrame; |
503 |
new_tabs->m_tabs = new wxAuiTabCtrl( this, |
505 |
new_tabs->m_tabs = new wxAuiTabCtrl( this, |
504 |
m_tab_id_counter++, |
506 |
m_tabIdCounter++, |
505 |
wxDefaultPosition, |
507 |
wxDefaultPosition, |
506 |
wxDefaultSize, |
508 |
wxDefaultSize, |
507 |
wxNO_BORDER | wxWANTS_CHARS ); |
509 |
wxNO_BORDER | wxWANTS_CHARS ); |
508 |
new_tabs->m_tabs->SetArtProvider( m_tabs.GetArtProvider()->Clone() ); |
510 |
new_tabs->m_tabs->SetArtProvider( m_tabs.GetArtProvider()->Clone() ); |
509 |
new_tabs->SetTabCtrlHeight( m_tab_ctrl_height ); |
511 |
new_tabs->SetTabCtrlHeight( m_tabCtrlHeight ); |
510 |
new_tabs->m_tabs->SetFlags( m_flags ); |
512 |
new_tabs->m_tabs->SetFlags( m_flags ); |
511 |
wxAuiTabCtrl * dest_tabs = new_tabs->m_tabs; |
513 |
wxAuiTabCtrl * dest_tabs = new_tabs->m_tabs; |
512 |
|
514 |
|
Lines 555-561
Link Here
|
555 |
m_mgr.LoadPerspective( frames ); |
557 |
m_mgr.LoadPerspective( frames ); |
556 |
|
558 |
|
557 |
// Force refresh of selection |
559 |
// Force refresh of selection |
558 |
m_curpage = -1; |
560 |
m_curPage = -1; |
559 |
SetSelection( sel_page ); |
561 |
SetSelection( sel_page ); |
560 |
|
562 |
|
561 |
return true; |
563 |
return true; |
562 |
-- a/src/AuiNotebook.h |
564 |
++ b/src/AuiNotebook.h |
Lines 205-211
Link Here
|
205 |
|
205 |
|
206 |
virtual ~guAuiNotebook(); |
206 |
virtual ~guAuiNotebook(); |
207 |
|
207 |
|
208 |
virtual void UpdateTabCtrlHeight(); |
208 |
virtual bool UpdateTabCtrlHeight(); |
209 |
|
209 |
|
210 |
wxString SavePerspective( void ); |
210 |
wxString SavePerspective( void ); |
211 |
bool LoadPerspective( const wxString &layout ); |
211 |
bool LoadPerspective( const wxString &layout ); |
212 |
-- a/CMakeLists.txt |
212 |
++ b/CMakeLists.txt |
Lines 120-126
Link Here
|
120 |
SET( ADD_WXSQLITE_SUPPORT 0 ) |
120 |
SET( ADD_WXSQLITE_SUPPORT 0 ) |
121 |
PKG_CHECK_MODULES( LIBWXSQLITE3 wxsqlite3 ) |
121 |
PKG_CHECK_MODULES( LIBWXSQLITE3 wxsqlite3 ) |
122 |
IF( NOT LIBWXSQLITE3_LIBRARIES ) |
122 |
IF( NOT LIBWXSQLITE3_LIBRARIES ) |
123 |
PKG_CHECK_MODULES( LIBWXSQLITE3 wxsqlite3-2.8 ) |
123 |
PKG_CHECK_MODULES( LIBWXSQLITE3 wxsqlite3-3.0 ) |
124 |
IF( NOT LIBWXSQLITE3_LIBRARIES ) |
124 |
IF( NOT LIBWXSQLITE3_LIBRARIES ) |
125 |
ADD_DEFINITIONS(-DADD_WXSQLITE_SUPPORT=1) |
125 |
ADD_DEFINITIONS(-DADD_WXSQLITE_SUPPORT=1) |
126 |
SET( ADD_WXSQLITE_SUPPORT 1 ) |
126 |
SET( ADD_WXSQLITE_SUPPORT 1 ) |
127 |
-- a/src/LastFMPanel.cpp |
127 |
++ b/src/LastFMPanel.cpp |
Lines 2812-2818
Link Here
|
2812 |
if( event.GetKeyCode() == WXK_RETURN ) |
2812 |
if( event.GetKeyCode() == WXK_RETURN ) |
2813 |
{ |
2813 |
{ |
2814 |
wxCommandEvent CmdEvent( wxEVT_COMMAND_TEXT_ENTER ); |
2814 |
wxCommandEvent CmdEvent( wxEVT_COMMAND_TEXT_ENTER ); |
2815 |
m_ArtistTextCtrl->AddPendingEvent( CmdEvent ); |
2815 |
m_ArtistTextCtrl->GetEventHandler()->AddPendingEvent( CmdEvent ); |
2816 |
return; |
2816 |
return; |
2817 |
} |
2817 |
} |
2818 |
event.Skip(); |
2818 |
event.Skip(); |
2819 |
-- a/src/MainApp.cpp |
2819 |
++ b/src/MainApp.cpp |
Lines 360-367
Link Here
|
360 |
if( LangInfo ) |
360 |
if( LangInfo ) |
361 |
{ |
361 |
{ |
362 |
guLogError( wxT( "Could not initialize the translations engine for ( %s )" ), LangInfo->CanonicalName.c_str() ); |
362 |
guLogError( wxT( "Could not initialize the translations engine for ( %s )" ), LangInfo->CanonicalName.c_str() ); |
363 |
wxStandardPaths StdPaths; |
363 |
guLogError( wxT( "Locale directory '%s'" ), wxStandardPaths::Get().GetLocalizedResourcesDir( LangInfo->CanonicalName, wxStandardPaths::ResourceCat_Messages).c_str() ); |
364 |
guLogError( wxT( "Locale directory '%s'" ), StdPaths.GetLocalizedResourcesDir( LangInfo->CanonicalName, wxStandardPaths::ResourceCat_Messages).c_str() ); |
|
|
365 |
} |
364 |
} |
366 |
else |
365 |
else |
367 |
{ |
366 |
{ |
368 |
-- a/src/PLSoListBox.cpp |
367 |
++ b/src/PLSoListBox.cpp |
Lines 179-185
Link Here
|
179 |
if( event.GetKeyCode() == WXK_DELETE ) |
179 |
if( event.GetKeyCode() == WXK_DELETE ) |
180 |
{ |
180 |
{ |
181 |
wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED, ID_TRACKS_DELETE ); |
181 |
wxCommandEvent evt( wxEVT_COMMAND_MENU_SELECTED, ID_TRACKS_DELETE ); |
182 |
GetParent()->AddPendingEvent( evt ); |
182 |
GetParent()->GetEventHandler()->AddPendingEvent( evt ); |
183 |
return; |
183 |
return; |
184 |
} |
184 |
} |
185 |
|
185 |
|
186 |
-- a/src/StatusBar.cpp |
186 |
++ b/src/StatusBar.cpp |
Lines 509-515
Link Here
|
509 |
} |
509 |
} |
510 |
|
510 |
|
511 |
// -------------------------------------------------------------------------------- // |
511 |
// -------------------------------------------------------------------------------- // |
512 |
void guStatusBar::DrawField( wxDC &dc, int i ) |
512 |
void guStatusBar::DrawField( wxDC &dc, int i, int textHeight ) |
513 |
{ |
513 |
{ |
514 |
wxRect rect; |
514 |
wxRect rect; |
515 |
GetFieldRect( i, rect ); |
515 |
GetFieldRect( i, rect ); |
Lines 521-527
Link Here
|
521 |
dc.DrawLine( rect.x + rect.width, rect.y + 1, rect.x + rect.width, rect.y + rect.height - 1 ); |
521 |
dc.DrawLine( rect.x + rect.width, rect.y + 1, rect.x + rect.width, rect.y + rect.height - 1 ); |
522 |
} |
522 |
} |
523 |
|
523 |
|
524 |
DrawFieldText( dc, i ); |
524 |
DrawFieldText( dc, rect, i, textHeight ); |
525 |
} |
525 |
} |
526 |
|
526 |
|
527 |
// -------------------------------------------------------------------------------- // |
527 |
// -------------------------------------------------------------------------------- // |
528 |
-- a/src/TagInfo.cpp |
528 |
++ b/src/TagInfo.cpp |
Lines 2453-2459
Link Here
|
2453 |
} |
2453 |
} |
2454 |
|
2454 |
|
2455 |
// -------------------------------------------------------------------------------- // |
2455 |
// -------------------------------------------------------------------------------- // |
2456 |
bool guTagSetLyrics( const wxString &filename, wxString &lyrics ) |
2456 |
bool guTagSetLyrics( const wxString &filename, const wxString &lyrics ) |
2457 |
{ |
2457 |
{ |
2458 |
guMainFrame * MainFrame = ( guMainFrame * ) wxTheApp->GetTopWindow(); |
2458 |
guMainFrame * MainFrame = ( guMainFrame * ) wxTheApp->GetTopWindow(); |
2459 |
|
2459 |
|
2460 |
-- a/src/TagInfo.h |
2460 |
++ b/src/TagInfo.h |
Lines 329-335
Link Here
|
329 |
bool guTagSetPicture( const wxString &filename, wxImage * picture ); |
329 |
bool guTagSetPicture( const wxString &filename, wxImage * picture ); |
330 |
bool guTagSetPicture( const wxString &filename, const wxString &imagefile ); |
330 |
bool guTagSetPicture( const wxString &filename, const wxString &imagefile ); |
331 |
wxString guTagGetLyrics( const wxString &filename ); |
331 |
wxString guTagGetLyrics( const wxString &filename ); |
332 |
bool guTagSetLyrics( const wxString &filename, wxString &lyrics ); |
332 |
bool guTagSetLyrics( const wxString &filename, const wxString &lyrics ); |
333 |
//void guUpdateTrack( const guTrack &track, const wxImage * image, const wxString &lyrics, const int &changedflags ); |
333 |
//void guUpdateTrack( const guTrack &track, const wxImage * image, const wxString &lyrics, const int &changedflags ); |
334 |
void guUpdateTracks( const guTrackArray &tracks, const guImagePtrArray &images, |
334 |
void guUpdateTracks( const guTrackArray &tracks, const guImagePtrArray &images, |
335 |
const wxArrayString &lyrics, const wxArrayInt &changedflags ); |
335 |
const wxArrayString &lyrics, const wxArrayInt &changedflags ); |
336 |
-- a/src/PlayListAppend.cpp |
336 |
++ b/src/PlayListAppend.cpp |
Lines 128-134
Link Here
|
128 |
int guPlayListAppend::GetSelectedPlayList( void ) |
128 |
int guPlayListAppend::GetSelectedPlayList( void ) |
129 |
{ |
129 |
{ |
130 |
int Selection = m_PlayListComboBox->GetSelection(); |
130 |
int Selection = m_PlayListComboBox->GetSelection(); |
131 |
if( Selection == wxNOT_FOUND && !m_PlayListComboBox->IsEmpty() ) |
131 |
if( Selection == wxNOT_FOUND && m_PlayListComboBox->GetCount() != 0 ) |
132 |
{ |
132 |
{ |
133 |
Selection = FindPlayListItem( m_PlayListItems, m_PlayListComboBox->GetValue().Lower().Trim().Trim( false ) ); |
133 |
Selection = FindPlayListItem( m_PlayListItems, m_PlayListComboBox->GetValue().Lower().Trim().Trim( false ) ); |
134 |
} |
134 |
} |
135 |
-- a/src/AlbumBrowser.cpp |
135 |
++ b/src/AlbumBrowser.cpp |
Lines 2308-2314
Link Here
|
2308 |
// Its a LeftUp event |
2308 |
// Its a LeftUp event |
2309 |
event.SetEventType( wxEVT_LEFT_DOWN ); |
2309 |
event.SetEventType( wxEVT_LEFT_DOWN ); |
2310 |
event.m_leftDown = true; |
2310 |
event.m_leftDown = true; |
2311 |
m_BigCoverTracksListBox->AddPendingEvent( event ); |
2311 |
m_BigCoverTracksListBox->GetEventHandler()->AddPendingEvent( event ); |
2312 |
} |
2312 |
} |
2313 |
return; |
2313 |
return; |
2314 |
} |
2314 |
} |
2315 |
-- a/src/AuiDockArt.cpp |
2315 |
++ b/src/AuiDockArt.cpp |
Lines 23-29
Link Here
|
23 |
#include "Images.h" |
23 |
#include "Images.h" |
24 |
#include "Utils.h" |
24 |
#include "Utils.h" |
25 |
|
25 |
|
26 |
extern wxString wxAuiChopText( wxDC &dc, const wxString &text, int max_size ); |
26 |
wxString wxAuiChopText(wxDC& dc, const wxString& text, int max_size) |
|
|
27 |
{ |
28 |
wxCoord x,y; |
29 |
|
30 |
// first check if the text fits with no problems |
31 |
dc.GetTextExtent(text, &x, &y); |
32 |
if (x <= max_size) |
33 |
return text; |
34 |
|
35 |
size_t i, len = text.Length(); |
36 |
size_t last_good_length = 0; |
37 |
for (i = 0; i < len; ++i) |
38 |
{ |
39 |
wxString s = text.Left(i); |
40 |
s += wxT("..."); |
41 |
|
42 |
dc.GetTextExtent(s, &x, &y); |
43 |
if (x > max_size) |
44 |
break; |
45 |
|
46 |
last_good_length = i; |
47 |
} |
48 |
|
49 |
wxString ret = text.Left(last_good_length); |
50 |
ret += wxT("..."); |
51 |
return ret; |
52 |
} |
53 |
|
27 |
|
54 |
|
28 |
// -------------------------------------------------------------------------------- // |
55 |
// -------------------------------------------------------------------------------- // |
29 |
guAuiDockArt::guAuiDockArt() : wxAuiDefaultDockArt() |
56 |
guAuiDockArt::guAuiDockArt() : wxAuiDefaultDockArt() |
Lines 42-53
Link Here
|
42 |
// -------------------------------------------------------------------------------- // |
69 |
// -------------------------------------------------------------------------------- // |
43 |
void guAuiDockArt::DrawCaptionBackground( wxDC &dc, const wxRect &rect, bool active ) |
70 |
void guAuiDockArt::DrawCaptionBackground( wxDC &dc, const wxRect &rect, bool active ) |
44 |
{ |
71 |
{ |
45 |
if( m_gradient_type == wxAUI_GRADIENT_NONE ) |
72 |
if( m_gradientType == wxAUI_GRADIENT_NONE ) |
46 |
{ |
73 |
{ |
47 |
if( active ) |
74 |
if( active ) |
48 |
dc.SetBrush( wxBrush( m_active_caption_colour ) ); |
75 |
dc.SetBrush( wxBrush( m_activeCaptionColour ) ); |
49 |
else |
76 |
else |
50 |
dc.SetBrush( wxBrush( m_inactive_caption_colour ) ); |
77 |
dc.SetBrush( wxBrush( m_inactiveCaptionColour ) ); |
51 |
|
78 |
|
52 |
dc.DrawRectangle( rect.x, rect.y, rect.width, rect.height ); |
79 |
dc.DrawRectangle( rect.x, rect.y, rect.width, rect.height ); |
53 |
} |
80 |
} |
Lines 58-72
Link Here
|
58 |
// on mac the gradients are expected to become darker from the top |
85 |
// on mac the gradients are expected to become darker from the top |
59 |
#ifdef __WXMAC__ |
86 |
#ifdef __WXMAC__ |
60 |
DrawGradientRectangle( dc, rect, |
87 |
DrawGradientRectangle( dc, rect, |
61 |
m_active_caption_colour, |
88 |
m_activeCaptionColour, |
62 |
m_active_caption_gradient_colour, |
89 |
m_activeCaptionGradientColour, |
63 |
m_gradient_type ); |
90 |
m_gradientType ); |
64 |
#else |
91 |
#else |
65 |
// on other platforms, active gradients become lighter at the top |
92 |
// on other platforms, active gradients become lighter at the top |
66 |
DrawGradientRectangle( dc, rect, |
93 |
DrawGradientRectangle( dc, rect, |
67 |
m_active_caption_colour, |
94 |
m_activeCaptionColour, |
68 |
m_active_caption_gradient_colour, |
95 |
m_activeCaptionGradientColour, |
69 |
m_gradient_type ); |
96 |
m_gradientType ); |
70 |
#endif |
97 |
#endif |
71 |
} |
98 |
} |
72 |
else |
99 |
else |
Lines 74-93
Link Here
|
74 |
#ifdef __WXMAC__ |
101 |
#ifdef __WXMAC__ |
75 |
// on mac the gradients are expected to become darker from the top |
102 |
// on mac the gradients are expected to become darker from the top |
76 |
DrawGradientRectangle( dc, rect, |
103 |
DrawGradientRectangle( dc, rect, |
77 |
m_inactive_caption_colour, |
104 |
m_inactiveCaptionColour, |
78 |
m_inactive_caption_gradient_colour, |
105 |
m_inactiveCaptionGradientColour, |
79 |
m_gradient_type ); |
106 |
m_gradientType ); |
80 |
#else |
107 |
#else |
81 |
// on other platforms, inactive gradients become lighter at the bottom |
108 |
// on other platforms, inactive gradients become lighter at the bottom |
82 |
DrawGradientRectangle( dc, rect, |
109 |
DrawGradientRectangle( dc, rect, |
83 |
m_inactive_caption_colour, |
110 |
m_inactiveCaptionColour, |
84 |
m_inactive_caption_gradient_colour, |
111 |
m_inactiveCaptionGradientColour, |
85 |
m_gradient_type ); |
112 |
m_gradientType ); |
86 |
#endif |
113 |
#endif |
87 |
} |
114 |
} |
88 |
} |
115 |
} |
89 |
|
116 |
|
90 |
dc.SetPen( m_border_pen ); |
117 |
dc.SetPen( m_borderPen ); |
91 |
int y = rect.y + rect.height - 1; |
118 |
int y = rect.y + rect.height - 1; |
92 |
dc.DrawLine( rect.x, y, rect.x + rect.width, y ); |
119 |
dc.DrawLine( rect.x, y, rect.x + rect.width, y ); |
93 |
} |
120 |
} |
Lines 97-107
Link Here
|
97 |
void guAuiDockArt::DrawCaption( wxDC &dc, wxWindow * window, const wxString &text, const wxRect &rect, wxAuiPaneInfo &pane ) |
124 |
void guAuiDockArt::DrawCaption( wxDC &dc, wxWindow * window, const wxString &text, const wxRect &rect, wxAuiPaneInfo &pane ) |
98 |
{ |
125 |
{ |
99 |
dc.SetPen( * wxTRANSPARENT_PEN ); |
126 |
dc.SetPen( * wxTRANSPARENT_PEN ); |
100 |
dc.SetFont( m_caption_font ); |
127 |
dc.SetFont( m_captionFont ); |
101 |
|
128 |
|
102 |
DrawCaptionBackground( dc, rect, bool( pane.state & wxAuiPaneInfo::optionActive ) ); |
129 |
DrawCaptionBackground( dc, rect, bool( pane.state & wxAuiPaneInfo::optionActive ) ); |
103 |
|
130 |
|
104 |
dc.SetTextForeground( pane.state & wxAuiPaneInfo::optionActive ? m_active_caption_text_colour : m_inactive_caption_text_colour ); |
131 |
dc.SetTextForeground( pane.state & wxAuiPaneInfo::optionActive ? m_activeCaptionTextColour : m_inactiveCaptionTextColour ); |
105 |
|
132 |
|
106 |
wxCoord w, h; |
133 |
wxCoord w, h; |
107 |
dc.GetTextExtent( wxT( "ABCDEFHXfgkj" ), &w, &h ); |
134 |
dc.GetTextExtent( wxT( "ABCDEFHXfgkj" ), &w, &h ); |
Lines 110-120
Link Here
|
110 |
clip_rect.width -= 3; // text offset |
137 |
clip_rect.width -= 3; // text offset |
111 |
clip_rect.width -= 2; // button padding |
138 |
clip_rect.width -= 2; // button padding |
112 |
if( pane.HasCloseButton() ) |
139 |
if( pane.HasCloseButton() ) |
113 |
clip_rect.width -= m_button_size; |
140 |
clip_rect.width -= m_buttonSize; |
114 |
if( pane.HasPinButton() ) |
141 |
if( pane.HasPinButton() ) |
115 |
clip_rect.width -= m_button_size; |
142 |
clip_rect.width -= m_buttonSize; |
116 |
if( pane.HasMaximizeButton() ) |
143 |
if( pane.HasMaximizeButton() ) |
117 |
clip_rect.width -= m_button_size; |
144 |
clip_rect.width -= m_buttonSize; |
118 |
|
145 |
|
119 |
wxString draw_text = wxAuiChopText( dc, text, clip_rect.width ); |
146 |
wxString draw_text = wxAuiChopText( dc, text, clip_rect.width ); |
120 |
|
147 |
|
121 |
-- a/src/SmartMode.cpp |
148 |
++ b/src/SmartMode.cpp |
Lines 500-506
Link Here
|
500 |
int guGenSmartPlaylist::GetPlayListId( void ) |
500 |
int guGenSmartPlaylist::GetPlayListId( void ) |
501 |
{ |
501 |
{ |
502 |
int Selection = m_SaveToComboBox->GetSelection(); |
502 |
int Selection = m_SaveToComboBox->GetSelection(); |
503 |
if( Selection == wxNOT_FOUND && !m_SaveToComboBox->IsEmpty() ) |
503 |
if( Selection == wxNOT_FOUND && m_SaveToComboBox->GetCount() != 0 ) |
504 |
{ |
504 |
{ |
505 |
Selection = FindPlayListItem( &m_Playlists, m_SaveToComboBox->GetValue().Lower().Trim().Trim( false ) ); |
505 |
Selection = FindPlayListItem( &m_Playlists, m_SaveToComboBox->GetValue().Lower().Trim().Trim( false ) ); |
506 |
} |
506 |
} |
507 |
-- a/src/StaticBitmap.cpp |
507 |
++ b/src/StaticBitmap.cpp |
Lines 70-76
Link Here
|
70 |
{ |
70 |
{ |
71 |
wxCommandEvent event( guStaticBitmapMouseOverEvent, guEVT_STATICBITMAP_MOUSE_OVER ); |
71 |
wxCommandEvent event( guStaticBitmapMouseOverEvent, guEVT_STATICBITMAP_MOUSE_OVER ); |
72 |
event.SetEventObject( this ); |
72 |
event.SetEventObject( this ); |
73 |
m_Bitmap->AddPendingEvent( event ); |
73 |
m_Bitmap->GetEventHandler()->AddPendingEvent( event ); |
74 |
} |
74 |
} |
75 |
} |
75 |
} |
76 |
|
76 |
|
77 |
-- a/src/Equalizer.cpp |
77 |
++ b/src/Equalizer.cpp |
Lines 537-543
Link Here
|
537 |
{ |
537 |
{ |
538 |
int Sel = m_PresetComboBox->GetSelection(); |
538 |
int Sel = m_PresetComboBox->GetSelection(); |
539 |
|
539 |
|
540 |
m_SaveButton->Enable( !m_PresetComboBox->IsEmpty() && |
540 |
m_SaveButton->Enable( m_PresetComboBox->GetCount() != 0 && |
541 |
( m_BandChanged || !FindPresetName( m_PresetComboBox->GetValue(), m_EQPresets ) ) ); |
541 |
( m_BandChanged || !FindPresetName( m_PresetComboBox->GetValue(), m_EQPresets ) ) ); |
542 |
|
542 |
|
543 |
m_DelButton->Enable( Sel != wxNOT_FOUND ); |
543 |
m_DelButton->Enable( Sel != wxNOT_FOUND ); |
544 |
-- a/src/LocationPanel.cpp |
544 |
++ b/src/LocationPanel.cpp |
Lines 161-167
Link Here
|
161 |
return 1; |
161 |
return 1; |
162 |
} |
162 |
} |
163 |
|
163 |
|
164 |
extern wxColor wxAuiStepColour( const wxColor & c, int percent ); |
164 |
unsigned char wxAuiBlendColour(unsigned char fg, unsigned char bg, double alpha) |
|
|
165 |
{ |
166 |
double result = bg + (alpha * (fg - bg)); |
167 |
if (result < 0.0) |
168 |
result = 0.0; |
169 |
if (result > 255) |
170 |
result = 255; |
171 |
return (unsigned char)result; |
172 |
} |
173 |
|
174 |
wxColor wxAuiStepColour(const wxColor& c, int ialpha) |
175 |
{ |
176 |
if (ialpha == 100) |
177 |
return c; |
178 |
|
179 |
unsigned char r = c.Red(), |
180 |
g = c.Green(), |
181 |
b = c.Blue(); |
182 |
unsigned char bg; |
183 |
|
184 |
// ialpha is 0..200 where 0 is completely black |
185 |
// and 200 is completely white and 100 is the same |
186 |
// convert that to normal alpha 0.0 - 1.0 |
187 |
ialpha = wxMin(ialpha, 200); |
188 |
ialpha = wxMax(ialpha, 0); |
189 |
double alpha = ((double)(ialpha - 100.0))/100.0; |
190 |
|
191 |
if (ialpha > 100) |
192 |
{ |
193 |
// blend with white |
194 |
bg = 255; |
195 |
alpha = 1.0 - alpha; // 0 = transparent fg; 1 = opaque fg |
196 |
} |
197 |
else |
198 |
{ |
199 |
// blend with black |
200 |
bg = 0; |
201 |
alpha += 1.0; // 0 = transparent fg; 1 = opaque fg |
202 |
} |
203 |
|
204 |
r = wxAuiBlendColour(r, bg, alpha); |
205 |
g = wxAuiBlendColour(g, bg, alpha); |
206 |
b = wxAuiBlendColour(b, bg, alpha); |
207 |
|
208 |
return wxColour(r, g, b); |
209 |
} |
165 |
|
210 |
|
166 |
// -------------------------------------------------------------------------------- // |
211 |
// -------------------------------------------------------------------------------- // |
167 |
void guLocationTreeCtrl::ReloadItems( const bool loadstate ) |
212 |
void guLocationTreeCtrl::ReloadItems( const bool loadstate ) |
168 |
-- a/src/StatusBar.h |
213 |
++ b/src/StatusBar.h |
Lines 46-52
Link Here
|
46 |
public : |
46 |
public : |
47 |
guGauge() : wxControl() { m_LastValue = wxNOT_FOUND; m_PaintWidth = 0; }; |
47 |
guGauge() : wxControl() { m_LastValue = wxNOT_FOUND; m_PaintWidth = 0; }; |
48 |
guGauge( wxWindow * parent, const wxString &label = wxEmptyString, bool showporcent = true, wxWindowID id = wxID_ANY, unsigned int max = 100, |
48 |
guGauge( wxWindow * parent, const wxString &label = wxEmptyString, bool showporcent = true, wxWindowID id = wxID_ANY, unsigned int max = 100, |
49 |
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxGA_HORIZONTAL ); |
49 |
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxGA_HORIZONTAL | wxBORDER_NONE ); |
50 |
~guGauge( void ); |
50 |
~guGauge( void ); |
51 |
|
51 |
|
52 |
void SetRange( int range ); |
52 |
void SetRange( int range ); |
Lines 101-107
Link Here
|
101 |
void SetPlayMode( const bool forcegapless ); |
101 |
void SetPlayMode( const bool forcegapless ); |
102 |
void SetAudioScrobble( const bool audioscrobble ); |
102 |
void SetAudioScrobble( const bool audioscrobble ); |
103 |
|
103 |
|
104 |
virtual void DrawField( wxDC &dc, int i ); |
104 |
virtual void DrawField( wxDC &dc, int i, int textHeight ); |
105 |
|
105 |
|
106 |
}; |
106 |
}; |
107 |
|
107 |
|
108 |
-- a/src/Utils.cpp |
108 |
++ b/src/Utils.cpp |
Lines 311-317
Link Here
|
311 |
static const wxChar marks[] = wxT( "-_.\"!~*()'" ); |
311 |
static const wxChar marks[] = wxT( "-_.\"!~*()'" ); |
312 |
|
312 |
|
313 |
wxString RetVal; |
313 |
wxString RetVal; |
314 |
unsigned char CurChar; |
314 |
wxChar CurChar; |
315 |
|
315 |
|
316 |
wxCharBuffer CharBuffer = url.ToUTF8(); |
316 |
wxCharBuffer CharBuffer = url.ToUTF8(); |
317 |
int Index; |
317 |
int Index; |
Lines 352-358
Link Here
|
352 |
|
352 |
|
353 |
for( index = 0; index < StrLen; index++ ) |
353 |
for( index = 0; index < StrLen; index++ ) |
354 |
{ |
354 |
{ |
355 |
unsigned char C = CharBuffer[ index ]; |
355 |
wxChar C = CharBuffer[ index ]; |
356 |
{ |
356 |
{ |
357 |
static const wxChar marks[] = wxT( " -_.\"/+!~*()'[]%" ); //~!@#$&*()=:/,;?+' |
357 |
static const wxChar marks[] = wxT( " -_.\"/+!~*()'[]%" ); //~!@#$&*()=:/,;?+' |
358 |
|
358 |
|
359 |
-- a/src/ListView.cpp |
359 |
++ b/src/ListView.cpp |
Lines 914-920
Link Here
|
914 |
// iterate over all visible lines |
914 |
// iterate over all visible lines |
915 |
for( ; line < lineMax; line++ ) |
915 |
for( ; line < lineMax; line++ ) |
916 |
{ |
916 |
{ |
917 |
const wxCoord hLine = OnGetLineHeight( line ); |
917 |
const wxCoord hLine = OnGetRowHeight( line ); |
918 |
|
918 |
|
919 |
rectLine.height = hLine; |
919 |
rectLine.height = hLine; |
920 |
|
920 |
|
921 |
-- a/src/TimeLine.h |
921 |
++ b/src/TimeLine.h |
Lines 115-121
Link Here
|
115 |
|
115 |
|
116 |
virtual void TimerEvent( void ); |
116 |
virtual void TimerEvent( void ); |
117 |
virtual int TimerCreate( void ); |
117 |
virtual int TimerCreate( void ); |
118 |
virtual void TimerDestroy( void ) { g_source_remove( m_TimerId ); } |
118 |
virtual void TimerDestroy( void ) { int id = m_TimerId; m_TimerId = 0; if (id) g_source_remove( id ); } |
119 |
|
119 |
|
120 |
}; |
120 |
}; |
121 |
|
121 |
|
122 |
-- a/src/SplashWin.cpp |
122 |
++ b/src/SplashWin.cpp |
Lines 79-85
Link Here
|
79 |
|
79 |
|
80 |
Show( true ); |
80 |
Show( true ); |
81 |
SetThemeEnabled( false ); |
81 |
SetThemeEnabled( false ); |
82 |
SetBackgroundStyle( wxBG_STYLE_CUSTOM ); |
82 |
SetBackgroundStyle( wxBG_STYLE_ERASE ); |
83 |
|
83 |
|
84 |
m_Timer.SetOwner( this ); |
84 |
m_Timer.SetOwner( this ); |
85 |
m_Timer.Start( timeout, wxTIMER_ONE_SHOT ); |
85 |
m_Timer.Start( timeout, wxTIMER_ONE_SHOT ); |
86 |
-- a/src/RoundButton.cpp |
86 |
++ b/src/RoundButton.cpp |
Lines 33-39
Link Here
|
33 |
|
33 |
|
34 |
// -------------------------------------------------------------------------------- // |
34 |
// -------------------------------------------------------------------------------- // |
35 |
guRoundButton::guRoundButton( wxWindow * parent, const wxImage &image, const wxImage &selimage, const int flags ) : |
35 |
guRoundButton::guRoundButton( wxWindow * parent, const wxImage &image, const wxImage &selimage, const int flags ) : |
36 |
wxControl( parent, wxID_ANY ) |
36 |
wxControl( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE ) |
37 |
{ |
37 |
{ |
38 |
m_Bitmap = wxBitmap( image ); |
38 |
m_Bitmap = wxBitmap( image ); |
39 |
m_HoverBitmap = wxBitmap( selimage ); |
39 |
m_HoverBitmap = wxBitmap( selimage ); |
40 |
-- a/src/RatingCtrl.cpp |
40 |
++ b/src/RatingCtrl.cpp |
Lines 34-40
Link Here
|
34 |
END_EVENT_TABLE() |
34 |
END_EVENT_TABLE() |
35 |
|
35 |
|
36 |
// -------------------------------------------------------------------------------- // |
36 |
// -------------------------------------------------------------------------------- // |
37 |
guRating::guRating( wxWindow * parent, const int style ) : wxControl( parent, wxID_ANY ) |
37 |
guRating::guRating( wxWindow * parent, const int style ) : |
|
|
38 |
wxControl( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE ) |
38 |
{ |
39 |
{ |
39 |
m_Rating = wxNOT_FOUND; |
40 |
m_Rating = wxNOT_FOUND; |
40 |
m_Style = style; |
41 |
m_Style = style; |
41 |
-- a/src/ToggleRoundButton.cpp |
42 |
++ b/src/ToggleRoundButton.cpp |
Lines 35-41
Link Here
|
35 |
// -------------------------------------------------------------------------------- // |
35 |
// -------------------------------------------------------------------------------- // |
36 |
guToggleRoundButton::guToggleRoundButton( wxWindow * parent, const wxImage &image, |
36 |
guToggleRoundButton::guToggleRoundButton( wxWindow * parent, const wxImage &image, |
37 |
const wxImage &selimage, const wxImage &hoverimage ) : |
37 |
const wxImage &selimage, const wxImage &hoverimage ) : |
38 |
wxControl( parent, wxID_ANY ) |
38 |
wxControl( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE ) |
39 |
{ |
39 |
{ |
40 |
m_Bitmap = wxBitmap( selimage ); |
40 |
m_Bitmap = wxBitmap( selimage ); |
41 |
m_DisBitmap = wxBitmap( image ); |
41 |
m_DisBitmap = wxBitmap( image ); |