1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #83 from F1ynn/master

Fix bug #58, remove some uneeded code
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-07-05 08:53:37 +02:00
commit fe7c7c6648
4 changed files with 5 additions and 32 deletions

View File

@ -91,6 +91,8 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
}
else if (selectedItem == removeFriendAction)
{
hide();
show(); //Toggle visibility to work around bug of repaintEvent() not being fired on parent widget when this is hidden
hide();
emit removeFriend(friendId);
return;

View File

@ -75,6 +75,8 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event)
QAction* selectedItem = menu.exec(pos);
if (selectedItem == quitGroup)
{
hide();
show(); //Toggle visibility to work around bug of repaintEvent() not being fired on parent widget when this is hidden
hide();
emit removeGroup(groupId);
return;

View File

@ -791,7 +791,6 @@ bool Widget::event(QEvent * e)
}
else if (allowToResize)
resizeWindow(k);
//right
else if (xMouse >= wWidth - PIXELS_TO_ACT or allowToResize)
{
inResizeZone = true;
@ -805,36 +804,6 @@ bool Widget::event(QEvent * e)
resizeWindow(k);
}
//left
else if (xMouse <= PIXELS_TO_ACT or allowToResize)
{
inResizeZone = true;
if (yMouse >= wHeight - PIXELS_TO_ACT)
setCursor(Qt::SizeBDiagCursor);
else if (yMouse <= PIXELS_TO_ACT)
setCursor(Qt::SizeFDiagCursor);
else
setCursor(Qt::SizeHorCursor);
resizeWindow(k);
}
//bottom edge
else if ((yMouse >= wHeight - PIXELS_TO_ACT) or allowToResize)
{
inResizeZone = true;
setCursor(Qt::SizeVerCursor);
resizeWindow(k);
}
//Cursor part top
else if (yMouse <= PIXELS_TO_ACT or allowToResize)
{
inResizeZone = true;
setCursor(Qt::SizeVerCursor);
resizeWindow(k);
}
else
{
inResizeZone = false;

View File

@ -11,7 +11,7 @@
#include "widget/form/settingsform.h"
#include "camera.h"
#define PIXELS_TO_ACT 5
#define PIXELS_TO_ACT 7
namespace Ui {
class Widget;