Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
KolourPaint
Commits
fab661bd
Commit
fab661bd
authored
Jan 13, 2021
by
Laurent Montel
😁
Browse files
Port deprecated methods/enum
parent
5ca26287
Changes
6
Hide whitespace changes
Inline
Side-by-side
kolourpaint.cpp
View file @
fab661bd
...
...
@@ -96,7 +96,7 @@ int main(int argc, char *argv [])
{
// Creates a kpMainWindow using the default constructor and then
// calls kpMainWindow::readProperties().
RESTORE
(
kpMainWindow
)
kRestoreMainWindows
<
kpMainWindow
>
();
}
else
{
...
...
tools/kpTool_MouseEvents.cpp
View file @
fab661bd
...
...
@@ -67,7 +67,7 @@ void kpTool::mousePressEvent (QMouseEvent *e)
<<
" beganDraw="
<<
d
->
beganDraw
<<
endl
;
#endif
if
(
e
->
button
()
==
Qt
::
MidButton
)
if
(
e
->
button
()
==
Qt
::
Mid
dle
Button
)
{
const
QString
text
=
QApplication
::
clipboard
()
->
text
(
QClipboard
::
Selection
);
#if DEBUG_KP_TOOL && 1
...
...
tools/kpTool_Utilities.cpp
View file @
fab661bd
...
...
@@ -207,7 +207,7 @@ bool kpTool::currentPointCardinallyNextToLast () const
int
kpTool
::
mouseButton
(
Qt
::
MouseButtons
mouseButtons
)
{
// we have nothing to do with mid-buttons
if
(
mouseButtons
&
Qt
::
MidButton
)
{
if
(
mouseButtons
&
Qt
::
Mid
dle
Button
)
{
return
-
1
;
}
...
...
views/kpView.cpp
View file @
fab661bd
...
...
@@ -659,7 +659,7 @@ QVariant kpView::inputMethodQuery (Qt::InputMethodQuery query) const
QVariant
ret
;
switch
(
query
)
{
case
Qt
::
Im
MicroFocus
:
case
Qt
::
Im
CursorRectangle
:
{
QRect
r
=
d
->
viewManager
->
textCursorRect
();
r
.
setTopLeft
(
r
.
topLeft
()
+
origin
());
...
...
widgets/imagelib/effects/kpNumInput.cpp
View file @
fab661bd
...
...
@@ -315,8 +315,7 @@ QSize kpIntNumInput::minimumSizeHint() const
h
=
qMax
(
h
,
priv
->
labelSize
.
height
()
+
2
);
}
const
int
spacingHint
=
style
()
->
pixelMetric
(
QStyle
::
PM_DefaultLayoutSpacing
);
w
=
priv
->
slider
?
priv
->
slider
->
sizeHint
().
width
()
+
spacingHint
:
0
;
w
=
priv
->
slider
?
priv
->
slider
->
sizeHint
().
width
()
:
0
;
w
+=
priv
->
column1Width
+
priv
->
column2Width
;
if
(
priv
->
labelAlignment
&
(
Qt
::
AlignTop
|
Qt
::
AlignBottom
))
{
...
...
@@ -344,7 +343,7 @@ void kpIntNumInput::resizeEvent(QResizeEvent *e)
int
w
=
priv
->
column1Width
;
int
h
=
0
;
const
int
spacingHint
=
style
()
->
pixelMetric
(
QStyle
::
PM_DefaultLayoutSpacing
);
const
int
spacingHint
=
0
;
//
style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
if
(
priv
->
label
&&
(
priv
->
labelAlignment
&
Qt
::
AlignTop
))
{
priv
->
label
->
setGeometry
(
0
,
0
,
e
->
size
().
width
(),
priv
->
labelSize
.
height
());
...
...
@@ -524,7 +523,7 @@ QSize kpDoubleNumInput::minimumSizeHint() const
h
=
qMax
(
h
,
priv
->
labelSize
.
height
()
+
2
);
}
const
int
spacingHint
=
style
()
->
pixelMetric
(
QStyle
::
PM_DefaultLayoutSpacing
);
const
int
spacingHint
=
0
;
//
style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
w
=
priv
->
slider
?
priv
->
slider
->
sizeHint
().
width
()
+
spacingHint
:
0
;
w
+=
priv
->
column1Width
+
priv
->
column2Width
;
...
...
@@ -541,7 +540,7 @@ void kpDoubleNumInput::resizeEvent(QResizeEvent *e)
int
w
=
priv
->
column1Width
;
int
h
=
0
;
const
int
spacingHint
=
style
()
->
pixelMetric
(
QStyle
::
PM_DefaultLayoutSpacing
);
const
int
spacingHint
=
0
;
//
style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
if
(
priv
->
label
&&
(
priv
->
labelAlignment
&
Qt
::
AlignTop
))
{
priv
->
label
->
setGeometry
(
0
,
0
,
e
->
size
().
width
(),
priv
->
labelSize
.
height
());
...
...
widgets/toolbars/kpColorToolBar.cpp
View file @
fab661bd
...
...
@@ -60,7 +60,7 @@ kpColorToolBar::kpColorToolBar (const QString &label, QWidget *parent)
QWidget
*
base
=
new
QWidget
(
this
);
m_boxLayout
=
new
QBoxLayout
(
QBoxLayout
::
LeftToRight
,
base
);
m_boxLayout
->
set
Margin
(
5
);
m_boxLayout
->
set
ContentsMargins
(
5
,
5
,
5
,
5
);
m_boxLayout
->
setSpacing
(
10
*
3
);
// This holds the current global foreground and background colors, for
...
...
Write
Preview
Supports
Markdown
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