@@ -369,6 +369,8 @@ bool MainWindow::Load() {
369369 InitThreading ();
370370 RegisterForGlobalHotkeys ();
371371
372+ LoadPosition (0 , 0 );
373+
372374 bool compact = PrefReadBool (false , " compact" );
373375 compact_ = !compact;
374376 SetCompact (compact);
@@ -845,8 +847,6 @@ void MainWindow::Paint() {
845847
846848void MainWindow::SetDoubleSize (bool v) {
847849 PlatformWindow::SetDoubleSize (v);
848- eq_window_->SetDoubleSize (v);
849- PrefWriteInt (v, " double_size" );
850850 SetVisualizer (24 , 43 , 76 , 16 );
851851}
852852
@@ -980,7 +980,12 @@ void MainWindow::Perform(int cmd) {
980980 if (const char *s = PlatformReadClipboard ())
981981 TspPlayerPlayContext (tsp_, s, NULL , 0 );
982982 break ;
983- case CMD_DOUBLE_SIZE: SetDoubleSize (!double_size ()); break ;
983+ case CMD_DOUBLE_SIZE: {
984+ bool is_double_size (!double_size ());
985+ PrefWriteInt (is_double_size, " double_size" );
986+ SetDoubleSize (is_double_size);
987+ eq_window_->SetDoubleSize (is_double_size);
988+ } break ;
984989 case CMD_ALWAYS_ON_TOP: SetAlwaysOnTop (!always_on_top ()); break ;
985990 case CMD_COMPACT: SetCompact (!compact_); break ;
986991 case CMD_LOGIN: ShowLoginDialog (); break ;
@@ -1514,6 +1519,7 @@ void MainWindow::GlobalHotkey(int id) {
15141519// PLAYLIST WINDOW
15151520// /////////////////////////////////////////////////////////
15161521PlaylistWindow::PlaylistWindow (MainWindow *main_window) {
1522+ id_ = 1 ;
15171523 main_window_ = main_window;
15181524 hover_button_ = -1 ;
15191525 Resize (WND_MAIN_W, WND_MAIN_H * 3 );
@@ -1524,6 +1530,7 @@ PlaylistWindow::~PlaylistWindow() {
15241530}
15251531
15261532void PlaylistWindow::Load () {
1533+ LoadPosition (main_window.screen_rect ()->left , main_window.screen_rect ()->bottom );
15271534 SetCompact (PrefReadBool (false , " pl.compact" ));
15281535 font_size_ = PrefReadInt (10 , " pl.font_size" );
15291536 row_height_ = 13 ;
@@ -1997,6 +2004,7 @@ void PlaylistWindow::Perform(int cmd) {
19972004// EQUALIZER WINDOW
19982005// /////////////////////////////////////////////////////////
19992006EqWindow::EqWindow (MainWindow *main_window) {
2007+ id_ = 2 ;
20002008 main_window_ = main_window;
20012009 hover_button_ = -1 ;
20022010 hover_eq_ = -1 ;
@@ -2014,6 +2022,8 @@ void EqWindow::Load() {
20142022 gain_mode_ = PrefReadInt (0 , " eq.gain_mode" );
20152023 CopyToTsp ();
20162024
2025+ LoadPosition (main_window.screen_rect ()->right , main_window.screen_rect ()->top );
2026+ SetDoubleSize (PrefReadBool (false , " double_size" ));
20172027 SetCompact (PrefReadBool (false , " eq.compact" ));
20182028}
20192029
@@ -2375,6 +2385,7 @@ void EqWindow::ShowPresets() {
23752385
23762386
23772387GenWindow::GenWindow () {
2388+ id_ = 3 ;
23782389 hover_button_ = -1 ;
23792390 left_button_down_ = false ;
23802391 Resize (275 , 116 *2 +29 );
@@ -2528,6 +2539,7 @@ void GenWindow::Paint() {
25282539// /////////////////////////////////////////////////////////
25292540
25302541CoverArtWindow::CoverArtWindow (MainWindow *main_window) {
2542+ id_ = 4 ;
25312543 main_window_ = main_window;
25322544 image_needs_load_ = false ;
25332545 bitmap_ = NULL ;
@@ -2596,6 +2608,7 @@ void CoverArtWindow::SetImage(const char* image) {
25962608#include < vector>
25972609
25982610void CoverArtWindow::Load () {
2611+ LoadPosition (main_window.screen_rect ()->right , main_window.screen_rect ()->bottom );
25992612 if (image_ == " " ) { return ; }
26002613
26012614 PlatformDeleteBitmap (bitmap_);
@@ -2680,12 +2693,9 @@ PlatformWindow *InitSpotamp(int argc, char **argv) {
26802693 if (!main_window.Load ())
26812694 return NULL ;
26822695
2683- playlist_window.Move (main_window.screen_rect ()->left , main_window.screen_rect ()->bottom );
2684- eq_window.Move (main_window.screen_rect ()->right , main_window.screen_rect ()->top );
2685- coverart_window.Move (main_window.screen_rect ()->right , main_window.screen_rect ()->bottom );
2686-
26872696 eq_window.Load ();
26882697 playlist_window.Load ();
2698+ coverart_window.Load ();
26892699
26902700 InitVisualizer ();
26912701
0 commit comments