[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 4a746bf08dff0a0e107fadd8b2fdd9326830d71d
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
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);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits