|
|
@ -652,16 +652,16 @@ void UBGraphicsTextItemDelegate::updateAlighButtonState() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
asAlBtn->setMixedButtonVisible(false); |
|
|
|
asAlBtn->setMixedButtonVisible(false); |
|
|
|
switch (static_cast<int>(delegated()->textCursor().blockFormat().alignment())) { |
|
|
|
|
|
|
|
case Qt::AlignCenter : |
|
|
|
Qt::Alignment cf = delegated()->textCursor().blockFormat().alignment(); |
|
|
|
|
|
|
|
qDebug() << "getting alignment" << cf; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (cf & Qt::AlignCenter) { |
|
|
|
asAlBtn->setKind(AlignTextButton::k_center); |
|
|
|
asAlBtn->setKind(AlignTextButton::k_center); |
|
|
|
break; |
|
|
|
} else if (cf & Qt::AlignRight) { |
|
|
|
case Qt::AlignRight : |
|
|
|
|
|
|
|
asAlBtn->setKind(AlignTextButton::k_right); |
|
|
|
asAlBtn->setKind(AlignTextButton::k_right); |
|
|
|
break; |
|
|
|
} else { |
|
|
|
default: |
|
|
|
|
|
|
|
asAlBtn->setKind(AlignTextButton::k_left); |
|
|
|
asAlBtn->setKind(AlignTextButton::k_left); |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|