From 86b079cb74b4852d581aa81ef6028e77938f5608 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Thu, 4 Apr 2013 01:25:04 +0200 Subject: [PATCH] Yet another slightly different approach to move the disque. --- etc/Translation/Blank.ts | 146 +++++++++++++++++------------------ etc/Translation/LameXP_PL.ts | 146 +++++++++++++++++------------------ etc/Translation/LameXP_SV.ts | 146 +++++++++++++++++------------------ src/Config.h | 2 +- src/Dialog_About.cpp | 89 +++++++++++++-------- src/Dialog_About.h | 8 ++ 6 files changed, 286 insertions(+), 251 deletions(-) diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index 4e25cb6d..52070569 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -54,319 +54,319 @@ - + LameXP - Audio Encoder Front-end - + Please visit %1 for news and updates! - - + + Note: This demo (pre-release) version of LameXP will expire at %1. Still %2 days left. - + Note: LameXP is free software. Do <b>not</b> pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should <b>not</b> respond to the offer !!! - + The following people have contributed to LameXP: - + Programmers: - + Project Leader - + Translators: - + Special thanks to: - + Doom9's Forum - + Gleitz | German Doom9 - + Hydrogenaudio Forums - + RareWares - + GitHub - + SourceForge - + Qt Developer Network - + Marius Hudea - + If you are willing to contribute a LameXP translation, feel free to contact us! - + The following third-party software is used in LameXP: - + LAME - OpenSource mp3 Encoder - - - - - - - - - - - - + + + + + + + + + + + + Released under the terms of the GNU Lesser General Public License. - + OggEnc - Ogg Vorbis Encoder - + Completely open and patent-free audio encoding technology. - + Nero AAC Reference MPEG-4 Encoder - + Freeware state-of-the-art HE-AAC encoder with 2-Pass support. - + Available from vendor web-site as free download: - + Aften - A/52 audio encoder - + FLAC - Free Lossless Audio Codec - + Open and patent-free lossless audio compression technology. - + Opus Audio Codec - + Totally open, royalty-free, highly versatile audio codec. - + mpg123 - Fast Console MPEG Audio Player/Decoder - + FAAD - OpenSource MPEG-4 and MPEG-2 AAC Decoder - + Released under the terms of the GNU General Public License. - + Valdec from AC3Filter Tools - AC3/DTS Decoder - + WavPack - Hybrid Lossless Compression - + Completely open audio compression format. - + Musepack - Living Audio Compression - + Monkey's Audio - Lossless Audio Compressor - + Freely available source code, simple SDK and non-restrictive licensing. - + Shorten - Lossless Audio Compressor - + Speex - Free Codec For Free Speech - + Open Source patent-free audio format designed for speech. - + The True Audio - Lossless Audio Codec - + refalac - Win32 command line ALAC encoder/decoder - + The ALAC reference implementation by Apple is available under the Apache license. - + wma2wav - Dump WMA files to Wave Audio - + Copyright (c) 2011 LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved. - + avs2wav - Avisynth to Wave Audio converter - + By Jory Stone <jcsston@toughguy.net> and LoRd_MuldeR <mulder2@gmx.de>. - + dcaenc - + Copyright (c) 2008-2011 Alexander E. Patrakov. Distributed under the LGPL. - + MediaInfo - Media File Analysis Tool - + SoX - Sound eXchange - + GnuPG - The GNU Privacy Guard - + GNU Wget - Software for retrieving files using HTTP - + UPX - The Ultimate Packer for eXecutables - + Silk Icons - Over 700 icons in PNG format - + By Mark James, released under the Creative Commons 'by' License. - + The copyright of LameXP as a whole belongs to LoRd_MuldeR. The copyright of third-party software used in LameXP belongs to the individual authors. - + n/a diff --git a/etc/Translation/LameXP_PL.ts b/etc/Translation/LameXP_PL.ts index 5cc90e04..8c384951 100644 --- a/etc/Translation/LameXP_PL.ts +++ b/etc/Translation/LameXP_PL.ts @@ -4,23 +4,23 @@ AboutDialog - + LameXP - Audio Encoder Front-end LameXP - Program do kompresji dźwięku - + Please visit %1 for news and updates! Odwiedź %1 aby zobaczyć nowości i aktualizacje! - - + + Note: This demo (pre-release) version of LameXP will expire at %1. Still %2 days left. Uwaga: To jest wersja próbna LameXP, która wygaśnie %1. Pozostało jeszcze %2 dni. - + Note: LameXP is free software. Do <b>not</b> pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should <b>not</b> respond to the offer !!! Uwaga: LameXP jest darmowym oprogramowaniem. <b>Nie</b> płać nikomu za ten program! Jeśli ktoś oferuje Ci LameXP za pieniądze <b>nie</b> kupuj od niego!!! @@ -75,298 +75,298 @@ Zamknij - + The following people have contributed to LameXP: Osoby które pomogły w rozwoju LameXP: - + Programmers: Programiści: - + Project Leader Lider projektu - + Translators: Tłumacze: - + Special thanks to: Specjalne podziękowania dla: - + Doom9's Forum Forum Doom9 - + Gleitz | German Doom9 Gleitz | Niemieckiego Doom9 - + Hydrogenaudio Forums Forum Hydrogenaudio - + RareWares RareWares - + GitHub GitHub - + SourceForge SourceForge - + Qt Developer Network Qt Developer Network - + Marius Hudea Marius Hudea - + If you are willing to contribute a LameXP translation, feel free to contact us! Jeśli chcesz wspomóc LameXP w obsłudze większej ilości języków, nie wahaj skontaktować się z nami! - + The following third-party software is used in LameXP: Następujące programy firm trzecich zostały użyte w LameXP: - + LAME - OpenSource mp3 Encoder LAME - Otwartoźródłowy koder mp3 - - - - - - - - - - - - + + + + + + + + + + + + Released under the terms of the GNU Lesser General Public License. Wydane na warunkach licencji GNU Lesser General Public License. - + OggEnc - Ogg Vorbis Encoder OggEnc - Koder Ogg Vorbis - + Completely open and patent-free audio encoding technology. Całkowicie otwarta i wolna od patentów technologia kompresji dźwięku. - + Nero AAC Reference MPEG-4 Encoder Nero AAC Reference MPEG-4 Encoder - + Freeware state-of-the-art HE-AAC encoder with 2-Pass support. Darmowy, jedyny w swoim rodzaju koder HE-AAC z wsparciem dla dwóch przebiegów. - + Available from vendor web-site as free download: Darmowy pakiet dostępny ze strony wydawcy: - + Aften - A/52 audio encoder Aften - Koder dźwięku A/52 - + FLAC - Free Lossless Audio Codec FLAC - Darmowy i bezstartny kodek dźwięku - + Open and patent-free lossless audio compression technology. Otwarta i wolna od patentów technologia bezstratnej kompresji dźwięku. - + Opus Audio Codec Opus Audio Codec - + Totally open, royalty-free, highly versatile audio codec. Otwartoźródłowy, wolny od patentów, wielozadaniowy kodek dźwięku. - + mpg123 - Fast Console MPEG Audio Player/Decoder mpg123 - Szybki dekoder/odtwarzacz MPEG Audio - + FAAD - OpenSource MPEG-4 and MPEG-2 AAC Decoder FAAD - Otwartoźródłowy dekoder MPEG-4 oraz MPEG-2 AAC - + Released under the terms of the GNU General Public License. Wydane na warunkach licencji GNU General Public License. - + Valdec from AC3Filter Tools - AC3/DTS Decoder - + WavPack - Hybrid Lossless Compression Wavpack - Bezstratny hybrydowy kodek dźwięku - + Completely open audio compression format. Całkowicie otwarty format kompresji dźwięku. - + Musepack - Living Audio Compression Musepack - Koder dźwięku - + Monkey's Audio - Lossless Audio Compressor Monkey's Audio - Koder bezstratnego formatu dźwięku - + Freely available source code, simple SDK and non-restrictive licensing. Szeroko dostępny kod źródłowy, prosty SDK i bezrestrykcyjna licencja. - + Shorten - Lossless Audio Compressor Shorten - Bezstratny kodek dźwięku - + Speex - Free Codec For Free Speech Speex - Darmowy kodek dla mowy ludzkiej - + Open Source patent-free audio format designed for speech. Otwartoźródłowy, wolny od patentów format dźwięku przeznaczony dla mowy ludzkiej. - + The True Audio - Lossless Audio Codec The True Audio - Bezstratny kodek dźwięku - + refalac - Win32 command line ALAC encoder/decoder refalac - Koder/dekoder ALAC na platformę Win32 działający z wiersza poleceń - + The ALAC reference implementation by Apple is available under the Apache license. Referencyjna implementacja formatu ALAC firmy Apple jest dostępna na licencji Apache. - + wma2wav - Dump WMA files to Wave Audio wma2wav - Dekoder plików WMA do Wave - + Copyright (c) 2011 LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved. Prawa autorskie: 2011 LoRd_MuldeR <mulder2@gmx.de>. Pewne prawa zastrzeżone. - + avs2wav - Avisynth to Wave Audio converter avs2wav - Konwerter dźwięku z Avisynth do Wave - + By Jory Stone <jcsston@toughguy.net> and LoRd_MuldeR <mulder2@gmx.de>. Autorami programu są Jory Stone <jcsston@toughguy.net> i LoRd_MuldeR <mulder2@gmx.de>. - + dcaenc dcaenc - + Copyright (c) 2008-2011 Alexander E. Patrakov. Distributed under the LGPL. Prawa autorskie: 2008-2011 Alexander E. Patrakov. Rozpowszechniane na licencji LGPL. - + MediaInfo - Media File Analysis Tool MediaInfo - Narzędzie do analizy plików multimedialnych - + SoX - Sound eXchange SoX - Sound eXchange - + GnuPG - The GNU Privacy Guard GnuPG - GNU Privacy Guard - + GNU Wget - Software for retrieving files using HTTP GNU Wget - Oprogramowanie służące do pobierania plików za pomocą protokołu HTTP - + UPX - The Ultimate Packer for eXecutables UPX - The Ultimate Packer for eXecutables - + Silk Icons - Over 700 icons in PNG format Silk Icons - Ponad 700 ikon w formacie PNG - + By Mark James, released under the Creative Commons 'by' License. Autorstwa Mark James, wydane na licencji Creative Commons. - + The copyright of LameXP as a whole belongs to LoRd_MuldeR. The copyright of third-party software used in LameXP belongs to the individual authors. Do programu LameXP jako całości, prawa autorskie posiada LoRd_MuldeR. Prawa autorskie oprogramowania firm trzecich należą do autorów poszczególnych programów. - + n/a n/d diff --git a/etc/Translation/LameXP_SV.ts b/etc/Translation/LameXP_SV.ts index 6c1534f2..6c11c80a 100644 --- a/etc/Translation/LameXP_SV.ts +++ b/etc/Translation/LameXP_SV.ts @@ -4,23 +4,23 @@ AboutDialog - + LameXP - Audio Encoder Front-end LameXP - Ljudkonvertering - + Please visit %1 for news and updates! Besök %1 för nyheter och uppdateringar! - - + + Note: This demo (pre-release) version of LameXP will expire at %1. Still %2 days left. OBS! Denna testversion av LameXP kommer att upphöra %1. %2 dagar kvar. - + Note: LameXP is free software. Do <b>not</b> pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should <b>not</b> respond to the offer !!! OBS! LameXP är gratis mjukvara. Betala <b>inte</b> för att ladda ner eller använda LameXP! Om någon webbsida försöker ta betalt för LameXP, bör du lämna sidan <b>utan</b> att ladda ner något! @@ -75,298 +75,298 @@ Stäng - + The following people have contributed to LameXP: Följande har medverkat i LameXP: - + Programmers: Programmerare: - + Project Leader Projektledare - + Translators: Översättare: - + Special thanks to: Speciellt tack till: - + Doom9's Forum Doom9's Forum - + Gleitz | German Doom9 Gleitz | German Doom9 - + Hydrogenaudio Forums Hydrogenaudio Forums - + RareWares RareWares - + GitHub GitHub - + SourceForge SourceForge - + Qt Developer Network Qt Developer Network - + Marius Hudea Marius Hudea - + If you are willing to contribute a LameXP translation, feel free to contact us! Kontakta oss gärna om du vill medverka il LameXP, med en översättning! - + The following third-party software is used in LameXP: Följande 3:e-parts mjukvara används i LameXP: - + LAME - OpenSource mp3 Encoder LAME - OpenSource mp3 Encoder - - - - - - - - - - - - + + + + + + + + + + + + Released under the terms of the GNU Lesser General Public License. Släppt under Gnu Lesser General Public License. - + OggEnc - Ogg Vorbis Encoder OggEnc - Ogg Vorbis Encoder - + Completely open and patent-free audio encoding technology. Helt öppen och patentfri ljudkodningsteknologi. - + Nero AAC Reference MPEG-4 Encoder Nero AAC Reference MPEG-4 Encoder - + Freeware state-of-the-art HE-AAC encoder with 2-Pass support. Freeware state-of-the-art HE-AAC-kodare med stöd för 2-Pass. - + Available from vendor web-site as free download: Tillgänglig som gratis nedladdning, från utvecklarens webbsida: - + Aften - A/52 audio encoder Aften - A/52 audio encoder - + FLAC - Free Lossless Audio Codec FLAC - Free Lossless Audio Codec - + Open and patent-free lossless audio compression technology. Öppen och patentfri, förlustfri ljudkomprimeringsteknik. - + Opus Audio Codec Opus Audio Codec - + Totally open, royalty-free, highly versatile audio codec. Helt öppen, avgiftsfri, mycket mångsidig ljud-codec - + mpg123 - Fast Console MPEG Audio Player/Decoder mpg123 - Fast Console MPEG Audio Player/Decoder - + FAAD - OpenSource MPEG-4 and MPEG-2 AAC Decoder FAAD - OpenSource MPEG-4 and MPEG-2 AAC Decoder - + Released under the terms of the GNU General Public License. Släppt under GNU Generel Public License (GPL). - + Valdec from AC3Filter Tools - AC3/DTS Decoder - + WavPack - Hybrid Lossless Compression WavPack - Hybrid Lossless Compression - + Completely open audio compression format. Helt öppet ljudkomprimeringsformat. - + Musepack - Living Audio Compression Musepack - Living Audio Compression - + Monkey's Audio - Lossless Audio Compressor Monkey's Audio - Lossless Audio Compressor - + Freely available source code, simple SDK and non-restrictive licensing. Fritt tillgänglig källkod, enkel SDK och icke-restriktiv licensiering. - + Shorten - Lossless Audio Compressor Shorten - Lossless Audio Compressor - + Speex - Free Codec For Free Speech Speex - Free Codec For Free Speech - + Open Source patent-free audio format designed for speech. Öppen källkod, patentfritt ljudformat designat för tal. - + The True Audio - Lossless Audio Codec The True Audio - Lossless Audio Codec - + refalac - Win32 command line ALAC encoder/decoder refalac - Win32 kommandorad ALAC-kodare/-avkodare - + The ALAC reference implementation by Apple is available under the Apache license. ALAC referensimplementation av Apple finns tillgänglig under Apache-licensen. - + wma2wav - Dump WMA files to Wave Audio wma2wav - Dump WMA files to Wave Audio - + Copyright (c) 2011 LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved. Copyright (c) 2011 LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved. - + avs2wav - Avisynth to Wave Audio converter avs2wav - Avisynth to Wave Audio converter - + By Jory Stone <jcsston@toughguy.net> and LoRd_MuldeR <mulder2@gmx.de>. By Jory Stone <jcsston@toughguy.net> and LoRd_MuldeR <mulder2@gmx.de>. - + dcaenc dcaenc - + Copyright (c) 2008-2011 Alexander E. Patrakov. Distributed under the LGPL. Copyright (c) 2008-2011 Alexander E. Patrakov. Distributed under the LGPL. - + MediaInfo - Media File Analysis Tool MediaInfo - Analysverktyg för mediafiler - + SoX - Sound eXchange SoX - Sound eXchange - + GnuPG - The GNU Privacy Guard GnuPG - The GNU Privacy Guard - + GNU Wget - Software for retrieving files using HTTP GNU Wget - Mjukvara för att ta emot filer via HTTP - + UPX - The Ultimate Packer for eXecutables UPX - Den ultimata paketeraren för exekverbara filer - + Silk Icons - Over 700 icons in PNG format Silk Icons - Över 700 iconer i PNG-format - + By Mark James, released under the Creative Commons 'by' License. Av Mark James, publicerad under Creative Commons 'by' Licens. - + The copyright of LameXP as a whole belongs to LoRd_MuldeR. The copyright of third-party software used in LameXP belongs to the individual authors. The copyright of LameXP as a whole belongs to LoRd_MuldeR. The copyright of third-party software used in LameXP belongs to the individual authors. - + n/a n/a diff --git a/src/Config.h b/src/Config.h index 94cbca9e..7c9dfe99 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 7 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 10 -#define VER_LAMEXP_BUILD 1260 +#define VER_LAMEXP_BUILD 1263 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/Dialog_About.cpp b/src/Dialog_About.cpp index c687608e..a1fd0cc5 100644 --- a/src/Dialog_About.cpp +++ b/src/Dialog_About.cpp @@ -53,7 +53,6 @@ #define LINK(URL) QString("%2").arg(URL).arg(QString(URL).replace("-", "−")) #define TRIM_RIGHT(STR) do { while(STR.endsWith(QChar(' ')) || STR.endsWith(QChar('\t')) || STR.endsWith(QChar('\r')) || STR.endsWith(QChar('\n'))) STR.chop(1); } while(0) #define MAKE_TRANSPARENT(WIDGET) do { QPalette _p = (WIDGET)->palette(); _p.setColor(QPalette::Background, Qt::transparent); (WIDGET)->setPalette(_p); } while(0) -#define FLIP(X) do { (X) = (!(X)); } while (0) //Constants const char *AboutDialog::neroAacUrl = "http://www.nero.com/eng/technologies-aac-codec.html"; @@ -146,21 +145,28 @@ AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstSta ui->closeButton->show(); QPixmap disque(":/images/Disque.png"); - QRect screenGeometry = QApplication::desktop()->availableGeometry(); m_disque = new QLabel(this, Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); - m_disque->installEventFilter(this); + m_disque->resize(disque.size()); m_disque->setStyleSheet("background:transparent;"); m_disque->setAttribute(Qt::WA_TranslucentBackground); - m_disque->setGeometry(static_cast(lamexp_rand() % static_cast(screenGeometry.width() - disque.width())), static_cast(lamexp_rand() % static_cast(screenGeometry.height() - disque.height())), disque.width(), disque.height()); m_disque->setPixmap(disque); - m_disque->setWindowOpacity(0.01); - m_disque->show(); + m_disque->installEventFilter(this); + + connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(geometryUpdated())); + geometryUpdated(); + + m_discOpacity = 0.01; + m_disquePos.setX(static_cast(lamexp_rand() % static_cast(m_posMax_x - disque.width() - m_posMin_x)) + m_posMin_x); + m_disquePos.setY(static_cast(lamexp_rand() % static_cast(m_posMax_y - disque.height() - m_posMin_y)) + m_posMin_y); m_disqueFlags[0] = (lamexp_rand() > (UINT_MAX/2)); m_disqueFlags[1] = (lamexp_rand() > (UINT_MAX/2)); + m_disque->move(m_disquePos); + m_disque->setWindowOpacity(m_discOpacity); + m_disque->show(); + m_disqueTimer = new QTimer; connect(m_disqueTimer, SIGNAL(timeout()), this, SLOT(moveDisque())); - m_disqueTimer->setInterval(10); - m_disqueTimer->start(); + m_disqueTimer->start(10); connect(ui->aboutQtButton, SIGNAL(clicked()), this, SLOT(showAboutQt())); } @@ -238,8 +244,19 @@ int AboutDialog::exec() // Slots //////////////////////////////////////////////////////////// -#define TEMP_HIDE_DISQUE(CMD) \ -if(m_disque) { bool _tmp = m_disque->isVisible(); if(_tmp) m_disque->hide(); {CMD}; if(_tmp) { m_disque->show(); m_disque->setWindowOpacity(0.01); } } else {CMD} +#define TEMP_HIDE_DISQUE(CMD) do \ +{ \ + bool _tmp = (m_disque) ? m_disque->isVisible() : false; \ + if(_tmp) m_disque->hide(); \ + { CMD } \ + if(_tmp) \ + { \ + m_discOpacity = 0.01; \ + m_disque->setWindowOpacity(m_discOpacity); \ + m_disque->show(); \ + } \ +} \ +while(0) void AboutDialog::tabChanged(int index) { @@ -333,22 +350,16 @@ void AboutDialog::moveDisque(void) if(m_disque) { - QRect screenGeometry = QApplication::desktop()->availableGeometry(); - const int minX = screenGeometry.left(); - const int maxX = screenGeometry.width() - m_disque->width() + screenGeometry.left(); - const int minY = screenGeometry.top(); - const int maxY = screenGeometry.height() - m_disque->height() + screenGeometry.top(); + if(m_disquePos.x() <= m_posMin_x) { m_disqueFlags[0] = true; m_rotateNext = true; } + if(m_disquePos.x() >= m_posMax_x) { m_disqueFlags[0] = false; m_rotateNext = true; } + if(m_disquePos.y() <= m_posMin_y) { m_disqueFlags[1] = true; m_rotateNext = true; } + if(m_disquePos.y() >= m_posMax_y) { m_disqueFlags[1] = false; m_rotateNext = true; } - const QPoint posOld = m_disque->pos(); - const int x = qBound(minX, m_disqueFlags[0] ? posOld.x() + delta : posOld.x() - delta, maxX); - const int y = qBound(minY, m_disqueFlags[1] ? posOld.y() + delta : posOld.y() - delta, maxY); - - m_disque->move(x, y); - - const QPoint posNew = m_disque->pos(); - if(posNew.x() == posOld.x()) { FLIP(m_disqueFlags[0]); m_rotateNext = true; } - if(posNew.y() == posOld.y()) { FLIP(m_disqueFlags[1]); m_rotateNext = true; } + m_disquePos.setX(m_disqueFlags[0] ? (m_disquePos.x() + delta) : (m_disquePos.x() - delta)); + m_disquePos.setY(m_disqueFlags[1] ? (m_disquePos.y() + delta) : (m_disquePos.y() - delta)); + m_disque->move(m_disquePos); + if(m_rotateNext) { QPixmap *cartoon = NULL; @@ -359,24 +370,40 @@ void AboutDialog::moveDisque(void) if(cartoon) { m_disque->setPixmap(*cartoon); - m_disque->resize(cartoon->size()); + if(m_disque->size() != cartoon->size()) + { + m_disque->resize(cartoon->size()); + geometryUpdated(); + } } m_rotateNext = false; } - double opacity = m_disque->windowOpacity(); - if(opacity != 1.0) + if(m_discOpacity != 1.0) { - opacity = opacity + 0.01; - if(qFuzzyCompare(opacity, 1.0) || (opacity > 1.0)) + m_discOpacity = m_discOpacity + 0.01; + if(qFuzzyCompare(m_discOpacity, 1.0) || (m_discOpacity > 1.0)) { - opacity = 1.0; + m_discOpacity = 1.0; } - m_disque->setWindowOpacity(opacity); + m_disque->setWindowOpacity(m_discOpacity); + m_disque->update(); } } } +void AboutDialog::geometryUpdated(void) +{ + if(m_disque) + { + QRect screenGeometry = QApplication::desktop()->availableGeometry(); + m_posMin_x = screenGeometry.left(); + m_posMax_x = screenGeometry.width() - m_disque->width() + screenGeometry.left(); + m_posMin_y = screenGeometry.top(); + m_posMax_y = screenGeometry.height() - m_disque->height() + screenGeometry.top(); + } +} + void AboutDialog::adjustSize(void) { int maximumHeight = QApplication::desktop()->availableGeometry().height(); diff --git a/src/Dialog_About.h b/src/Dialog_About.h index a4a88d66..5d60b9f1 100644 --- a/src/Dialog_About.h +++ b/src/Dialog_About.h @@ -54,6 +54,7 @@ public slots: void moveDisque(void); void tabChanged(int index); void adjustSize(void); + void geometryUpdated(void); protected: virtual void showEvent(QShowEvent *e); @@ -68,9 +69,16 @@ private: QMap *m_initFlags; int m_lastTab; + int m_posMin_x; + int m_posMax_x; + int m_posMin_y; + int m_posMax_y; + QLabel *m_disque; QTimer * m_disqueTimer; bool m_disqueFlags[2]; + QPoint m_disquePos; + double m_discOpacity; QPixmap *m_cartoon[4]; bool m_rotateNext; __int64 m_disqueDelay;