Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
fadf8b36
Commit
fadf8b36
authored
Aug 05, 2022
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python 3.10 fixes
parent
34a6ef00
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
chatwindow.py
blink/chatwindow.py
+6
-6
sessions.py
blink/sessions.py
+7
-7
color.py
blink/widgets/color.py
+1
-1
No files found.
blink/chatwindow.py
View file @
fadf8b36
...
@@ -516,7 +516,7 @@ class ChatTextInput(QTextEdit):
...
@@ -516,7 +516,7 @@ class ChatTextInput(QTextEdit):
QTextEdit
.
keyPressEvent
(
self
,
event
)
QTextEdit
.
keyPressEvent
(
self
,
event
)
def
_SH_DocumentLayoutSizeChanged
(
self
,
new_size
):
def
_SH_DocumentLayoutSizeChanged
(
self
,
new_size
):
self
.
setFixedHeight
(
min
(
new_size
.
height
()
+
self
.
contentsMargins
()
.
top
()
+
self
.
contentsMargins
()
.
bottom
(),
self
.
parent
()
.
height
()
/
2
))
self
.
setFixedHeight
(
int
(
min
(
new_size
.
height
()
+
self
.
contentsMargins
()
.
top
()
+
self
.
contentsMargins
()
.
bottom
(),
self
.
parent
()
.
height
()
/
2
)
))
def
_SH_LockWidgetConfirmButtonClicked
(
self
):
def
_SH_LockWidgetConfirmButtonClicked
(
self
):
self
.
lockReleased
.
emit
(
self
.
lock_queue
.
popleft
())
self
.
lockReleased
.
emit
(
self
.
lock_queue
.
popleft
())
...
@@ -2068,7 +2068,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -2068,7 +2068,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self
.
_EH_ShowSessions
()
self
.
_EH_ShowSessions
()
elif
watched
is
self
.
state_label
:
elif
watched
is
self
.
state_label
:
if
event_type
==
QEvent
.
MouseButtonRelease
and
event
.
button
()
==
Qt
.
LeftButton
and
event
.
modifiers
()
==
Qt
.
NoModifier
:
if
event_type
==
QEvent
.
MouseButtonRelease
and
event
.
button
()
==
Qt
.
LeftButton
and
event
.
modifiers
()
==
Qt
.
NoModifier
:
upper_half
=
QRect
(
0
,
0
,
self
.
state_label
.
width
(),
self
.
state_label
.
height
()
/
2
)
upper_half
=
QRect
(
0
,
0
,
int
(
self
.
state_label
.
width
()),
int
(
self
.
state_label
.
height
()
/
2
)
)
if
upper_half
.
contains
(
event
.
pos
()):
if
upper_half
.
contains
(
event
.
pos
()):
self
.
_EH_CloseSession
()
self
.
_EH_CloseSession
()
else
:
else
:
...
@@ -2175,12 +2175,12 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -2175,12 +2175,12 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
painter
.
translate
(
+
1.5
,
+
1
)
painter
.
translate
(
+
1.5
,
+
1
)
painter
.
translate
(
0
,
+
1
)
painter
.
translate
(
0
,
+
1
)
painter
.
setPen
(
contrast_pen
)
painter
.
setPen
(
contrast_pen
)
painter
.
drawLine
(
-
3
.5
,
-
3.5
,
3.5
,
3.5
)
painter
.
drawLine
(
-
3
,
-
3
,
3
,
3
)
painter
.
drawLine
(
-
3
.5
,
3.5
,
3.5
,
-
3.5
)
painter
.
drawLine
(
-
3
,
3
,
3
,
-
3
)
painter
.
translate
(
0
,
-
1
)
painter
.
translate
(
0
,
-
1
)
painter
.
setPen
(
pen
)
painter
.
setPen
(
pen
)
painter
.
drawLine
(
-
3
.5
,
-
3.5
,
3.5
,
3.5
)
painter
.
drawLine
(
-
3
,
-
3
,
3
,
3
)
painter
.
drawLine
(
-
3
.5
,
3.5
,
3.5
,
-
3.5
)
painter
.
drawLine
(
-
3
,
3
,
3
,
-
3
)
painter
.
restore
()
painter
.
restore
()
def
send_pending_imdn_messages
(
self
,
session
):
def
send_pending_imdn_messages
(
self
,
session
):
...
...
blink/sessions.py
View file @
fadf8b36
...
@@ -3259,8 +3259,8 @@ class ChatSessionDelegate(QStyledItemDelegate, ColorHelperMixin):
...
@@ -3259,8 +3259,8 @@ class ChatSessionDelegate(QStyledItemDelegate, ColorHelperMixin):
def
editorEvent
(
self
,
event
,
model
,
option
,
index
):
def
editorEvent
(
self
,
event
,
model
,
option
,
index
):
if
event
.
type
()
==
QEvent
.
MouseButtonRelease
and
event
.
button
()
==
Qt
.
LeftButton
and
event
.
modifiers
()
==
Qt
.
NoModifier
:
if
event
.
type
()
==
QEvent
.
MouseButtonRelease
and
event
.
button
()
==
Qt
.
LeftButton
and
event
.
modifiers
()
==
Qt
.
NoModifier
:
arrow_rect
=
option
.
rect
.
adjusted
(
option
.
rect
.
width
()
-
14
,
option
.
rect
.
height
()
/
2
,
0
,
0
)
# bottom half of the rightmost 14 pixels
arrow_rect
=
option
.
rect
.
adjusted
(
int
(
option
.
rect
.
width
()
-
14
),
int
(
option
.
rect
.
height
()
/
2
)
,
0
,
0
)
# bottom half of the rightmost 14 pixels
cross_rect
=
option
.
rect
.
adjusted
(
option
.
rect
.
width
()
-
14
,
0
,
0
,
-
option
.
rect
.
height
()
/
2
)
# top half of the rightmost 14 pixels
cross_rect
=
option
.
rect
.
adjusted
(
int
(
option
.
rect
.
width
()
-
14
),
0
,
0
,
int
(
-
option
.
rect
.
height
()
/
2
)
)
# top half of the rightmost 14 pixels
if
arrow_rect
.
contains
(
event
.
pos
()):
if
arrow_rect
.
contains
(
event
.
pos
()):
session_list
=
self
.
parent
()
session_list
=
self
.
parent
()
session_list
.
animation
.
setDirection
(
QPropertyAnimation
.
Backward
)
session_list
.
animation
.
setDirection
(
QPropertyAnimation
.
Backward
)
...
@@ -3350,12 +3350,12 @@ class ChatSessionDelegate(QStyledItemDelegate, ColorHelperMixin):
...
@@ -3350,12 +3350,12 @@ class ChatSessionDelegate(QStyledItemDelegate, ColorHelperMixin):
painter
.
translate
(
+
1.5
,
+
1
)
painter
.
translate
(
+
1.5
,
+
1
)
painter
.
translate
(
0
,
+
1
)
painter
.
translate
(
0
,
+
1
)
painter
.
setPen
(
contrast_pen
)
painter
.
setPen
(
contrast_pen
)
painter
.
drawLine
(
-
3
.5
,
-
3.5
,
3.5
,
3.5
)
painter
.
drawLine
(
-
3
,
3
,
3
,
-
3
)
painter
.
drawLine
(
-
3
.5
,
3.5
,
3.5
,
-
3.5
)
painter
.
drawLine
(
-
3
,
3
,
3
,
-
3
)
painter
.
translate
(
0
,
-
1
)
painter
.
translate
(
0
,
-
1
)
painter
.
setPen
(
pen
)
painter
.
setPen
(
pen
)
painter
.
drawLine
(
-
3
.5
,
-
3.5
,
3.5
,
3.5
)
painter
.
drawLine
(
-
3
,
-
3
,
3
,
3
)
painter
.
drawLine
(
-
3
.5
,
3.5
,
3.5
,
-
3.5
)
painter
.
drawLine
(
-
3
,
3
,
3
,
-
3
)
painter
.
restore
()
painter
.
restore
()
def
sizeHint
(
self
,
option
,
index
):
def
sizeHint
(
self
,
option
,
index
):
...
@@ -3545,7 +3545,7 @@ class ChatSessionListView(QListView):
...
@@ -3545,7 +3545,7 @@ class ChatSessionListView(QListView):
return
selection_model
.
NoUpdate
return
selection_model
.
NoUpdate
elif
event
.
type
()
==
QEvent
.
MouseButtonRelease
:
elif
event
.
type
()
==
QEvent
.
MouseButtonRelease
:
index_rect
=
self
.
visualRect
(
index
)
index_rect
=
self
.
visualRect
(
index
)
cross_rect
=
index_rect
.
adjusted
(
in
dex_rect
.
width
()
-
14
,
0
,
0
,
-
index_rect
.
height
()
/
2
)
# the top half of the rightmost 14 pixels
cross_rect
=
index_rect
.
adjusted
(
in
t
(
index_rect
.
width
()
-
14
),
0
,
0
,
int
(
-
index_rect
.
height
()
/
2
)
)
# the top half of the rightmost 14 pixels
if
cross_rect
.
contains
(
event
.
pos
()):
if
cross_rect
.
contains
(
event
.
pos
()):
return
selection_model
.
NoUpdate
return
selection_model
.
NoUpdate
else
:
else
:
...
...
blink/widgets/color.py
View file @
fadf8b36
...
@@ -296,7 +296,7 @@ class ColorHelperMixin(object):
...
@@ -296,7 +296,7 @@ class ColorHelperMixin(object):
def
color_with_alpha
(
self
,
color
,
alpha
):
def
color_with_alpha
(
self
,
color
,
alpha
):
color
=
QColor
(
color
)
color
=
QColor
(
color
)
color
.
setAlpha
(
alpha
)
color
.
setAlpha
(
int
(
alpha
)
)
return
color
return
color
def
alpha_color
(
self
,
color
,
alpha
):
def
alpha_color
(
self
,
color
,
alpha
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment