@@ -96,16 +96,16 @@ void Widget::live2dInitialized(QLive2dWidget *wid) {
96
96
wid->setModel (this ->currentConfiguration .getModelName ().toStdString ());
97
97
this ->initialized = true ;
98
98
}
99
- void Widget::mouseEvent (QPoint rel, QPoint abs ) {
99
+ void Widget::mouseEvent (QPoint rel, QPoint raw ) {
100
100
// cout<<"rel: "<<rel.x()<<", "<<rel.y()<<endl;
101
- // cout<<"abs: "<<abs .x()<<", "<<abs .y()<<endl;
101
+ // cout<<"abs: "<<raw .x()<<", "<<raw .y()<<endl;
102
102
widget->mouseMove (rel);
103
103
// widget->mouseMove(rel);
104
104
if (this ->currentConfiguration .isHideOnHover ()) {
105
- if (widget->geometry ().contains (rel ) && widget->isVisible ()) {
105
+ if (widget->geometry ().contains (raw ) && widget->isVisible ()) {
106
106
widget->hide ();
107
107
}
108
- if (!widget->geometry ().contains (rel ) && !widget->isVisible ()) {
108
+ if (!widget->geometry ().contains (raw ) && !widget->isVisible ()) {
109
109
widget->show ();
110
110
}
111
111
}
@@ -122,10 +122,7 @@ void Widget::setWidgetPosition(bool widgetOnLeft) {
122
122
}
123
123
}
124
124
125
- void Widget::mousePress (QPoint rel, QPoint abs) {
126
- if (!this ->widget ->isVisible ()) {
127
- return ;
128
- }
125
+ void Widget::mousePress (QPoint rel, QPoint raw) {
129
126
if (this ->widget ->geometry ().contains (rel)) {
130
127
if (this ->currentConfiguration .isHideOnHover ()) {
131
128
this ->widget ->mousePress (QPoint (rel.x (), this ->height () - rel.y ()));
@@ -136,10 +133,7 @@ void Widget::mousePress(QPoint rel, QPoint abs) {
136
133
}
137
134
}
138
135
139
- void Widget::mouseRelease (QPoint rel, QPoint abs) {
140
- if (!this ->widget ->isVisible ()) {
141
- return ;
142
- }
136
+ void Widget::mouseRelease (QPoint rel, QPoint raw) {
143
137
if (this ->widget ->geometry ().contains (rel)) {
144
138
if (this ->currentConfiguration .isHideOnHover ()) {
145
139
this ->widget ->mouseRelease (QPoint (rel.x (), this ->height () - rel.y ()));
0 commit comments