Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
Plugin-Color
Commits
51eaa82b
Commit
51eaa82b
authored
Feb 06, 2020
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed use of deprecated Functions
parent
a73dfbdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
ColorPlugin.cc
ColorPlugin.cc
+4
-6
ColorPlugin.hh
ColorPlugin.hh
+1
-1
No files found.
ColorPlugin.cc
View file @
51eaa82b
...
...
@@ -382,12 +382,10 @@ QIcon ColorPlugin::generateIcon(OpenMesh::Vec4f _color){
* @param _color a color
* @return the icon
*/
QIcon
ColorPlugin
::
generateIcon
(
QRgb
_color
){
QColor
color
(
_color
);
QIcon
ColorPlugin
::
generateIcon
(
QColor
_color
){
QPixmap
pic
(
32
,
32
);
pic
.
fill
(
color
);
pic
.
fill
(
_
color
);
return
QIcon
(
pic
);
}
...
...
@@ -438,9 +436,9 @@ void ColorPlugin::getColorDialog(){
bool
ok
;
Q
Rgb
newColor
=
QColorDialog
::
get
Rgba
(
getIconColor
(
button
->
icon
()
)
,
&
ok
);
Q
Color
newColor
=
QColorDialog
::
get
Color
(
getIconColor
(
button
->
icon
()
)
);
if
(
ok
)
if
(
newColor
.
isValid
()
)
button
->
setIcon
(
generateIcon
(
newColor
)
);
}
...
...
ColorPlugin.hh
View file @
51eaa82b
...
...
@@ -125,7 +125,7 @@ class ColorPlugin : public QObject, BaseInterface, MenuInterface, ScriptInterfac
ColorOptions
*
optionsWidget_
;
/// generate an icon from a given color
QIcon
generateIcon
(
Q
Rgb
_color
);
QIcon
generateIcon
(
Q
Color
_color
);
/// generate an icon from a given color
QIcon
generateIcon
(
OpenMesh
::
Vec4f
_color
);
...
...
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