Lines 105-114
Link Here
|
105 |
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "alterator", "browser", this); |
105 |
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "alterator", "browser", this); |
106 |
settings.setFallbacksEnabled(false); |
106 |
settings.setFallbacksEnabled(false); |
107 |
settings.beginGroup("qt"); |
107 |
settings.beginGroup("qt"); |
108 |
int wnd_x = settings.value("main_window_x", 0).toInt(); |
|
|
109 |
int wnd_y = settings.value("main_window_y", 0).toInt(); |
110 |
int wnd_width = settings.value("main_window_width", wnd_recom_width).toInt(); |
108 |
int wnd_width = settings.value("main_window_width", wnd_recom_width).toInt(); |
111 |
int wnd_height = settings.value("main_window_height", wnd_recom_height).toInt(); |
109 |
int wnd_height = settings.value("main_window_height", wnd_recom_height).toInt(); |
|
|
110 |
int wnd_x = settings.value("main_window_x", (int)(desktop_geom.width()/2 - (wnd_width/2))).toInt(); |
111 |
int wnd_y = settings.value("main_window_y", (int)(desktop_geom.height()/2 - (wnd_height/2))).toInt(); |
112 |
settings.endGroup(); |
112 |
settings.endGroup(); |
113 |
|
113 |
|
114 |
geometry_ = QRect(wnd_x, wnd_y, wnd_width, wnd_height); |
114 |
geometry_ = QRect(wnd_x, wnd_y, wnd_width, wnd_height); |