mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Fixed some conflicts
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <kandinsky/point.h>
|
||||
#include <kandinsky/coordinate.h>
|
||||
#include <apps/i18n.h>
|
||||
#include <poincare/preferences.h>
|
||||
#include <apps/global_preferences.h>
|
||||
|
||||
namespace Code {
|
||||
|
||||
@@ -19,11 +19,11 @@ void ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::setLine(Consol
|
||||
|
||||
void ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
ctx->fillRect(bounds(), Palette::CodeBackground);
|
||||
ctx->drawString(m_line->text(), KDPointZero, Poincare::Preferences::sharedPreferences()->KDPythonFont(), textColor(m_line), isHighlighted()? Palette::CodeBackgroundSelected : Palette::CodeBackground);
|
||||
ctx->drawString(m_line->text(), KDPointZero, GlobalPreferences::sharedGlobalPreferences()->font(), textColor(m_line), isHighlighted()? Palette::Select : KDColorWhite);
|
||||
}
|
||||
|
||||
KDSize ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::minimalSizeForOptimalDisplay() const {
|
||||
return Poincare::Preferences::sharedPreferences()->KDPythonFont()->stringSize(m_line->text());
|
||||
return GlobalPreferences::sharedGlobalPreferences()->font()->stringSize(m_line->text());
|
||||
}
|
||||
|
||||
ConsoleLineCell::ScrollableConsoleLineView::ScrollableConsoleLineView(Responder * parentResponder) :
|
||||
@@ -35,7 +35,7 @@ ConsoleLineCell::ScrollableConsoleLineView::ScrollableConsoleLineView(Responder
|
||||
ConsoleLineCell::ConsoleLineCell(Responder * parentResponder) :
|
||||
HighlightCell(),
|
||||
Responder(parentResponder),
|
||||
m_promptView(Poincare::Preferences::sharedPreferences()->KDPythonFont(), I18n::Message::ConsolePrompt, 0, 0.5),
|
||||
m_promptView(GlobalPreferences::sharedGlobalPreferences()->font(), I18n::Message::ConsolePrompt, 0, 0.5),
|
||||
m_scrollableView(this),
|
||||
m_line()
|
||||
{
|
||||
@@ -78,16 +78,16 @@ View * ConsoleLineCell::subviewAtIndex(int index) {
|
||||
return &m_scrollableView;
|
||||
}
|
||||
|
||||
void ConsoleLineCell::layoutSubviews() {
|
||||
void ConsoleLineCell::layoutSubviews(bool force) {
|
||||
if (m_line.isCommand()) {
|
||||
KDSize promptSize = Poincare::Preferences::sharedPreferences()->KDPythonFont()->stringSize(I18n::translate(I18n::Message::ConsolePrompt));
|
||||
m_promptView.setFrame(KDRect(KDPointZero, promptSize.width(), bounds().height()));
|
||||
m_scrollableView.setFrame(KDRect(KDPoint(promptSize.width(), 0), bounds().width() - promptSize.width(), bounds().height()));
|
||||
KDSize promptSize = GlobalPreferences::sharedGlobalPreferences()->font()->stringSize(I18n::translate(I18n::Message::ConsolePrompt));
|
||||
m_promptView.setFrame(KDRect(KDPointZero, promptSize.width(), bounds().height()), force);
|
||||
m_scrollableView.setFrame(KDRect(KDPoint(promptSize.width(), 0), bounds().width() - promptSize.width(), bounds().height()), force);
|
||||
return;
|
||||
}
|
||||
assert(m_line.isResult());
|
||||
m_promptView.setFrame(KDRectZero);
|
||||
m_scrollableView.setFrame(bounds());
|
||||
m_promptView.setFrame(KDRectZero, force);
|
||||
m_scrollableView.setFrame(bounds(), force);
|
||||
}
|
||||
|
||||
void ConsoleLineCell::didBecomeFirstResponder() {
|
||||
|
||||
Reference in New Issue
Block a user