Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
ed04ffce
Commit
ed04ffce
authored
May 19, 2007
by
coppro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GTK GetTextExtent bug
Added resources shell script
parent
0c454b4b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
3 deletions
+33
-3
Resources.sh
Resources.sh
+21
-0
src/gui/value/text.cpp
src/gui/value/text.cpp
+6
-0
src/util/rotation.cpp
src/util/rotation.cpp
+6
-3
No files found.
Resources.sh
0 → 100755
View file @
ed04ffce
#! /bin/bash
rm
-r
/usr/local/share/magicseteditor/resource
for
DIR
in
/usr/local/share/magicseteditor /usr/local/share/magicseteditor/resource /usr/local/share/magicseteditor/resource/icon /usr/local/share/magicseteditor/resource/tool /usr/local/share/magicseteditor/resource/cursor
do
if
[
-d
$DIR
]
;
then
:
;
elif
[
-a
$DIR
]
;
then
echo
$DIR
"exists and is not a directory!"
;
exit
1
;
else
mkdir
$DIR
;
fi
done
cp
src/resource/common/
*
/usr/local/share/magicseteditor/resource
;
cp
src/resource/msw/tool/
*
/usr/local/share/magicseteditor/resource/tool
;
cp
src/resource/msw/icon/
*
/usr/local/share/magicseteditor/resource/icon
;
cp
src/resource/msw/cursor/
*
/usr/local/share/magicseteditor/resource/cursor
;
cp
src/resource/msw/other/
*
/usr/local/share/magicseteditor/resource
;
\ No newline at end of file
src/gui/value/text.cpp
View file @
ed04ffce
...
@@ -457,6 +457,12 @@ void TextValueEditor::showCaret() {
...
@@ -457,6 +457,12 @@ void TextValueEditor::showCaret() {
dc
.
SetFont
(
style
().
font
.
toWxFont
(
1.0
));
dc
.
SetFont
(
style
().
font
.
toWxFont
(
1.0
));
int
hi
;
int
hi
;
dc
.
GetTextExtent
(
_
(
" "
),
0
,
&
hi
);
dc
.
GetTextExtent
(
_
(
" "
),
0
,
&
hi
);
#ifdef __WXGTK__
// HACK: Some fonts don't get the descender height set correctly.
int
charHeight
=
dc
.
GetCharHeight
();
if
(
charHeight
!=
hi
)
hi
+=
hi
-
charHeight
;
#endif
cursor
.
height
=
rot
.
trS
(
hi
);
cursor
.
height
=
rot
.
trS
(
hi
);
}
}
}
}
...
...
src/util/rotation.cpp
View file @
ed04ffce
...
@@ -235,10 +235,13 @@ double RotatedDC::getFontSizeStep() const {
...
@@ -235,10 +235,13 @@ double RotatedDC::getFontSizeStep() const {
}
}
RealSize
RotatedDC
::
GetTextExtent
(
const
String
&
text
)
const
{
RealSize
RotatedDC
::
GetTextExtent
(
const
String
&
text
)
const
{
int
w
,
h
,
descend
;
int
w
,
h
;
dc
.
GetTextExtent
(
text
,
&
w
,
&
h
,
&
descend
);
dc
.
GetTextExtent
(
text
,
&
w
,
&
h
);
#ifdef __WXGTK__
#ifdef __WXGTK__
h
+=
descend
;
/// wxGTK seems to think character height does not include the descender.
// HACK: Some fonts don't get the descender height set correctly.
int
charHeight
=
dc
.
GetCharHeight
();
if
(
charHeight
!=
h
)
h
+=
h
-
charHeight
;
#endif
#endif
if
(
quality
==
QUALITY_LOW
)
{
if
(
quality
==
QUALITY_LOW
)
{
return
RealSize
(
w
,
h
)
/
zoom
;
return
RealSize
(
w
,
h
)
/
zoom
;
...
...
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