| 582 | // halign has three possible values: center, left, and right. // |
| 583 | else if (info.tagName() == "halign") |
| 584 | { |
| 585 | if (getFirstText(info) == "center") |
| 586 | { |
| 587 | // Apparently Japanese is drawn along a _center_ line // |
| 588 | if (gContext->GetLanguage() == "ja") |
| 589 | { |
| 590 | attributes.textflags = attributes.textflags & |
| 591 | ~Qt::AlignHorizontal_Mask | |
| 592 | Qt::AlignCenter; |
| 593 | } |
| 594 | else |
| 595 | { |
| 596 | attributes.textflags = attributes.textflags & |
| 597 | ~Qt::AlignHorizontal_Mask | |
| 598 | Qt::AlignHCenter; |
| 599 | } |
| 600 | } |
| 601 | else if (getFirstText(info) == "left") |
| 602 | { |
| 603 | attributes.textflags = attributes.textflags & |
| 604 | ~Qt::AlignHorizontal_Mask | |
| 605 | Qt::AlignLeft | |
| 606 | Qt::WordBreak; |
| 607 | } |
| 608 | else if (getFirstText(info) == "right") |
| 609 | { |
| 610 | attributes.textflags = attributes.textflags & |
| 611 | ~Qt::AlignHorizontal_Mask | |
| 612 | Qt::AlignRight | |
| 613 | Qt::WordBreak; |
| 614 | } |
| 615 | else |
| 616 | { |
| 617 | VERBOSE(VB_GENERAL, |
| 618 | QString("MythThemedMenuPrivate: Unknown value %1 " |
| 619 | "for halign").arg(getFirstText(info))); |
| 620 | } |
| 621 | } |
| 622 | // valign has three possible values: center, top, and bottom. // |
| 623 | else if (info.tagName() == "valign") |
| 624 | { |
| 625 | if (getFirstText(info) == "center") |
| 626 | { |
| 627 | attributes.textflags = attributes.textflags & |
| 628 | ~Qt::AlignVertical_Mask | |
| 629 | Qt::AlignVCenter; |
| 630 | } |
| 631 | else if (getFirstText(info) == "top") |
| 632 | { |
| 633 | attributes.textflags = attributes.textflags & |
| 634 | ~Qt::AlignVertical_Mask | |
| 635 | Qt::AlignTop; |
| 636 | } |
| 637 | else if (getFirstText(info) == "bottom") |
| 638 | { |
| 639 | attributes.textflags = attributes.textflags & |
| 640 | ~Qt::AlignVertical_Mask | |
| 641 | Qt::AlignBottom; |
| 642 | } |
| 643 | else |
| 644 | { |
| 645 | VERBOSE(VB_GENERAL, |
| 646 | QString("MythThemedMenuPrivate: Unknown value %1 " |
| 647 | "for valign").arg(getFirstText(info))); |
| 648 | } |
| 649 | } |