Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
889b7443
Commit
889b7443
authored
10 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
tweak dark scheme
parent
c82efc82
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/GmshMessage.cpp
+13
-6
13 additions, 6 deletions
Common/GmshMessage.cpp
Fltk/FlGui.cpp
+9
-9
9 additions, 9 deletions
Fltk/FlGui.cpp
Fltk/FlGui.h
+0
-2
0 additions, 2 deletions
Fltk/FlGui.h
with
22 additions
and
17 deletions
Common/GmshMessage.cpp
+
13
−
6
View file @
889b7443
...
@@ -278,7 +278,8 @@ void Msg::Fatal(const char *fmt, ...)
...
@@ -278,7 +278,8 @@ void Msg::Fatal(const char *fmt, ...)
std
::
string
tmp
=
std
::
string
(
"@C1@."
)
+
"Fatal : "
+
str
;
std
::
string
tmp
=
std
::
string
(
"@C1@."
)
+
"Fatal : "
+
str
;
FlGui
::
instance
()
->
addMessage
(
tmp
.
c_str
());
FlGui
::
instance
()
->
addMessage
(
tmp
.
c_str
());
if
(
_firstError
.
empty
())
_firstError
=
str
;
if
(
_firstError
.
empty
())
_firstError
=
str
;
FlGui
::
instance
()
->
setLastStatus
(
FL_RED
);
FlGui
::
instance
()
->
setLastStatus
(
CTX
::
instance
()
->
guiColorScheme
?
FL_DARK_RED
:
FL_RED
);
FlGui
::
instance
()
->
saveMessages
FlGui
::
instance
()
->
saveMessages
((
CTX
::
instance
()
->
homeDir
+
CTX
::
instance
()
->
errorFileName
).
c_str
());
((
CTX
::
instance
()
->
homeDir
+
CTX
::
instance
()
->
errorFileName
).
c_str
());
fl_alert
(
"A fatal error has occurred which will force Gmsh to abort.
\n
"
fl_alert
(
"A fatal error has occurred which will force Gmsh to abort.
\n
"
...
@@ -323,10 +324,12 @@ void Msg::Error(const char *fmt, ...)
...
@@ -323,10 +324,12 @@ void Msg::Error(const char *fmt, ...)
#if defined(HAVE_FLTK)
#if defined(HAVE_FLTK)
if
(
FlGui
::
available
()){
if
(
FlGui
::
available
()){
if
(
FlGui
::
instance
()
->
in_main_thread
())
FlGui
::
instance
()
->
check
();
if
(
FlGui
::
instance
()
->
in_main_thread
())
FlGui
::
instance
()
->
check
();
std
::
string
tmp
=
std
::
string
(
"@C1@."
)
+
"Error : "
+
str
;
std
::
string
tmp
=
std
::
string
(
CTX
::
instance
()
->
guiColorScheme
?
"@B72@."
:
"@C1@."
)
+
"Error : "
+
str
;
FlGui
::
instance
()
->
addMessage
(
tmp
.
c_str
());
FlGui
::
instance
()
->
addMessage
(
tmp
.
c_str
());
if
(
_firstError
.
empty
())
_firstError
=
str
;
if
(
_firstError
.
empty
())
_firstError
=
str
;
FlGui
::
instance
()
->
setLastStatus
(
FL_RED
);
FlGui
::
instance
()
->
setLastStatus
(
CTX
::
instance
()
->
guiColorScheme
?
FL_DARK_RED
:
FL_RED
);
}
}
#endif
#endif
...
@@ -362,7 +365,8 @@ void Msg::Warning(const char *fmt, ...)
...
@@ -362,7 +365,8 @@ void Msg::Warning(const char *fmt, ...)
#if defined(HAVE_FLTK)
#if defined(HAVE_FLTK)
if
(
FlGui
::
available
()){
if
(
FlGui
::
available
()){
if
(
FlGui
::
instance
()
->
in_main_thread
())
FlGui
::
instance
()
->
check
();
if
(
FlGui
::
instance
()
->
in_main_thread
())
FlGui
::
instance
()
->
check
();
std
::
string
tmp
=
std
::
string
(
"@C5@."
)
+
"Warning : "
+
str
;
std
::
string
tmp
=
std
::
string
(
CTX
::
instance
()
->
guiColorScheme
?
"@B152@."
:
"@C5@."
)
+
"Warning : "
+
str
;
FlGui
::
instance
()
->
addMessage
(
tmp
.
c_str
());
FlGui
::
instance
()
->
addMessage
(
tmp
.
c_str
());
if
(
_firstWarning
.
empty
())
_firstWarning
=
str
;
if
(
_firstWarning
.
empty
())
_firstWarning
=
str
;
FlGui
::
instance
()
->
setLastStatus
();
FlGui
::
instance
()
->
setLastStatus
();
...
@@ -445,7 +449,8 @@ void Msg::Direct(const char *fmt, ...)
...
@@ -445,7 +449,8 @@ void Msg::Direct(const char *fmt, ...)
{
{
if
(
FlGui
::
available
()){
if
(
FlGui
::
available
()){
if
(
FlGui
::
instance
()
->
in_main_thread
())
FlGui
::
instance
()
->
check
();
if
(
FlGui
::
instance
()
->
in_main_thread
())
FlGui
::
instance
()
->
check
();
std
::
string
tmp
=
std
::
string
(
"@C4@."
)
+
str
;
std
::
string
tmp
=
std
::
string
(
CTX
::
instance
()
->
guiColorScheme
?
"@B136@."
:
"@C4@."
)
+
str
;
FlGui
::
instance
()
->
addMessage
(
tmp
.
c_str
());
FlGui
::
instance
()
->
addMessage
(
tmp
.
c_str
());
}
}
}
}
...
@@ -632,7 +637,9 @@ void Msg::PrintErrorCounter(const char *title)
...
@@ -632,7 +637,9 @@ void Msg::PrintErrorCounter(const char *title)
#if defined(HAVE_FLTK)
#if defined(HAVE_FLTK)
if
(
FlGui
::
available
()){
if
(
FlGui
::
available
()){
std
::
string
col
=
_errorCount
?
"@C1@."
:
"@C5@."
;
std
::
string
col
=
_errorCount
?
std
::
string
(
CTX
::
instance
()
->
guiColorScheme
?
"@B72@."
:
"@C1@."
)
:
std
::
string
(
CTX
::
instance
()
->
guiColorScheme
?
"@B152@."
:
"@C5@."
);
FlGui
::
instance
()
->
addMessage
((
col
+
prefix
+
line
).
c_str
());
FlGui
::
instance
()
->
addMessage
((
col
+
prefix
+
line
).
c_str
());
FlGui
::
instance
()
->
addMessage
((
col
+
prefix
+
title
).
c_str
());
FlGui
::
instance
()
->
addMessage
((
col
+
prefix
+
title
).
c_str
());
FlGui
::
instance
()
->
addMessage
((
col
+
prefix
+
warn
).
c_str
());
FlGui
::
instance
()
->
addMessage
((
col
+
prefix
+
warn
).
c_str
());
...
...
This diff is collapsed.
Click to expand it.
Fltk/FlGui.cpp
+
9
−
9
View file @
889b7443
...
@@ -986,11 +986,17 @@ void FlGui::setStatus(const std::string &msg, bool opengl)
...
@@ -986,11 +986,17 @@ void FlGui::setStatus(const std::string &msg, bool opengl)
void
FlGui
::
setLastStatus
(
int
col
)
void
FlGui
::
setLastStatus
(
int
col
)
{
{
for
(
unsigned
int
i
=
0
;
i
<
graph
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
graph
.
size
();
i
++
){
if
(
col
>=
0
&&
graph
[
0
]
->
getMessageHeight
()
<
FL_NORMAL_SIZE
)
if
(
col
>=
0
&&
graph
[
0
]
->
getMessageHeight
()
<
FL_NORMAL_SIZE
){
graph
[
i
]
->
getProgress
()
->
labelcolor
(
col
);
if
(
CTX
::
instance
()
->
guiColorScheme
)
// dark
graph
[
i
]
->
getProgress
()
->
color
(
col
);
else
else
graph
[
i
]
->
getProgress
()
->
labelcolor
(
col
);
}
else
{
graph
[
i
]
->
getProgress
()
->
color
(
FL_BACKGROUND_COLOR
);
graph
[
i
]
->
getProgress
()
->
labelcolor
(
FL_FOREGROUND_COLOR
);
graph
[
i
]
->
getProgress
()
->
labelcolor
(
FL_FOREGROUND_COLOR
);
}
}
}
setStatus
(
_lastStatus
);
setStatus
(
_lastStatus
);
}
}
...
@@ -1007,12 +1013,6 @@ void FlGui::setProgress(const std::string &msg, double val, double min, double m
...
@@ -1007,12 +1013,6 @@ void FlGui::setProgress(const std::string &msg, double val, double min, double m
setStatus
(
msg
);
setStatus
(
msg
);
}
}
void
FlGui
::
setProgressColor
(
int
col
)
{
for
(
unsigned
int
i
=
0
;
i
<
FlGui
::
instance
()
->
graph
.
size
();
i
++
)
FlGui
::
instance
()
->
graph
[
i
]
->
getProgress
()
->
labelcolor
(
col
);
}
void
FlGui
::
storeCurrentWindowsInfo
()
void
FlGui
::
storeCurrentWindowsInfo
()
{
{
CTX
::
instance
()
->
glPosition
[
0
]
=
graph
[
0
]
->
getWindow
()
->
x
();
CTX
::
instance
()
->
glPosition
[
0
]
=
graph
[
0
]
->
getWindow
()
->
x
();
...
...
This diff is collapsed.
Click to expand it.
Fltk/FlGui.h
+
0
−
2
View file @
889b7443
...
@@ -123,8 +123,6 @@ class FlGui{
...
@@ -123,8 +123,6 @@ class FlGui{
void
setLastStatus
(
int
col
=-
1
);
void
setLastStatus
(
int
col
=-
1
);
// display status message and update progress bar
// display status message and update progress bar
void
setProgress
(
const
std
::
string
&
msg
,
double
val
,
double
min
,
double
max
);
void
setProgress
(
const
std
::
string
&
msg
,
double
val
,
double
min
,
double
max
);
// set color of progress message
void
setProgressColor
(
int
col
);
// create the window for physical context dependant definitions
// create the window for physical context dependant definitions
void
callForSolverPlugin
(
int
dim
);
void
callForSolverPlugin
(
int
dim
);
// add line in message console
// add line in message console
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment