mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Be explicit about type of angles: either Radians or Degrees.
Angles are always doubles. Internally use radians as much as possible. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1605 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -297,7 +297,7 @@ void ChoiceValueEditor::onLoseFocus() {
|
||||
void ChoiceValueEditor::draw(RotatedDC& dc) {
|
||||
ChoiceValueViewer::draw(dc);
|
||||
if (nativeLook()) {
|
||||
draw_drop_down_arrow(&editor(), dc.getDC(), dc.trRectStraight(style().getInternalRect().grow(1)), drop_down->IsShown());
|
||||
draw_drop_down_arrow(&editor(), dc.getDC(), dc.trRectToBB(style().getInternalRect().grow(1)), drop_down->IsShown());
|
||||
}
|
||||
}
|
||||
void ChoiceValueEditor::determineSize(bool) {
|
||||
|
||||
@@ -88,7 +88,7 @@ class DropDownChoiceListBase : public DropDownList {
|
||||
|
||||
// ----------------------------------------------------------------------------- : DropDownChoiceList
|
||||
|
||||
/// A drop down list of color choices
|
||||
/// A drop down list of choices
|
||||
class DropDownChoiceList : public DropDownChoiceListBase {
|
||||
public:
|
||||
DropDownChoiceList(Window* parent, bool is_submenu, ValueViewer& cve, ChoiceField::ChoiceP group);
|
||||
|
||||
@@ -142,7 +142,7 @@ void ColorValueEditor::onLoseFocus() {
|
||||
void ColorValueEditor::draw(RotatedDC& dc) {
|
||||
ColorValueViewer::draw(dc);
|
||||
if (nativeLook()) {
|
||||
draw_drop_down_arrow(&editor(), dc.getDC(), dc.trRectStraight(dc.getInternalRect().grow(1)), drop_down->IsShown());
|
||||
draw_drop_down_arrow(&editor(), dc.getDC(), dc.trRectToBB(dc.getInternalRect().grow(1)), drop_down->IsShown());
|
||||
}
|
||||
}
|
||||
void ColorValueEditor::determineSize(bool) {
|
||||
|
||||
@@ -103,7 +103,7 @@ void PackageChoiceValueEditor::onLoseFocus() {
|
||||
void PackageChoiceValueEditor::draw(RotatedDC& dc) {
|
||||
PackageChoiceValueViewer::draw(dc);
|
||||
if (nativeLook()) {
|
||||
draw_drop_down_arrow(&editor(), dc.getDC(), dc.trRectStraight(style().getInternalRect().grow(1)), drop_down && drop_down->IsShown());
|
||||
draw_drop_down_arrow(&editor(), dc.getDC(), dc.trRectToBB(style().getInternalRect().grow(1)), drop_down && drop_down->IsShown());
|
||||
}
|
||||
}
|
||||
void PackageChoiceValueEditor::determineSize(bool) {
|
||||
|
||||
@@ -717,8 +717,8 @@ wxCursor TextValueEditor::cursor(const RealPoint& pos) const {
|
||||
hovered_words = p.get();
|
||||
const_cast<TextValueEditor*>(this)->redrawWordListIndicators();
|
||||
}
|
||||
int angle = viewer.getRotation().getAngle() + style().angle;
|
||||
if (sideways(angle)) { // 90 or 270 degrees
|
||||
Radians angle = viewer.getRotation().getAngle() + deg_to_rad(style().angle);
|
||||
if (is_sideways(angle)) { // 90 or 270 degrees
|
||||
if (!rotated_ibeam.Ok()) {
|
||||
rotated_ibeam = wxCursor(load_resource_cursor(_("rot_text")));
|
||||
}
|
||||
@@ -1248,7 +1248,7 @@ bool TextValueEditor::search(FindInfo& find, bool from_start) {
|
||||
|
||||
void TextValueEditor::determineSize(bool force_fit) {
|
||||
if (!nativeLook()) return;
|
||||
style().angle = 0; // no rotation in nativeLook
|
||||
style().angle = 0; // force no rotation in nativeLook
|
||||
if (scrollbar) {
|
||||
// muliline, determine scrollbar size
|
||||
Rotation rot = viewer.getRotation();
|
||||
|
||||
Reference in New Issue
Block a user