[tor-commits] [vidalia/alpha] Center detached tabs

chiiph at torproject.org chiiph at torproject.org
Wed Mar 7 14:13:47 UTC 2012


commit 4a746bf08dff0a0e107fadd8b2fdd9326830d71d
Author: Tomás Touceda <chiiph at torproject.org>
Date:   Wed Mar 7 11:12:54 2012 -0300

    Center detached tabs
---
 changes/bug5326            |    2 ++
 src/vidalia/MainWindow.cpp |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/changes/bug5326 b/changes/bug5326
new file mode 100644
index 0000000..7b03b33
--- /dev/null
+++ b/changes/bug5326
@@ -0,0 +1,2 @@
+  o Center detached tabs to avoid placing them out of reach. Fixes bug
+    5326.
\ No newline at end of file
diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
index c5e4094..a27b197 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -1729,6 +1729,8 @@ MainWindow::detachTab()
 
   ui.tabWidget->removeTab(index);
   tab->setParent(0);
+  QRect desk = QApplication::desktop()->screenGeometry(0);
+  tab->move(desk.center() - tab->rect().center());
   tab->show();
 
   QString key = _tabMap.at(index);



More information about the tor-commits mailing list