mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-18 19:43:24 +03:00
Add blockquote support.
Fix a border rendering bug. Fix background-color in UIRichText.
This commit is contained in:
@@ -104,6 +104,7 @@ h6 {
|
||||
|
||||
code {
|
||||
font-family: monospace;
|
||||
background-color: var(--list-back);
|
||||
}
|
||||
|
||||
p, ol, ul, pre {
|
||||
@@ -111,6 +112,7 @@ p, ol, ul, pre {
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0.67em 0;
|
||||
padding-left: 2em;
|
||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='40' fill='currentColor'/></svg>");
|
||||
background-tint: var(--font);
|
||||
@@ -133,12 +135,16 @@ a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
img {
|
||||
markdownview img {
|
||||
scale-type: fit-inside;
|
||||
layout-width: match_parent;
|
||||
layout-height: wrap_content;
|
||||
max-height: 100vh;
|
||||
clip: true;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding-left: 8dp;
|
||||
background-color: var(--list-back);
|
||||
border-left: 2dp solid var(--tab-line);
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
pushbutton,
|
||||
|
||||
@@ -1181,7 +1181,7 @@ UIBorderDrawable* UINode::getBorder() const {
|
||||
if ( NULL == mBorder ) {
|
||||
mBorder = UIBorderDrawable::New( this );
|
||||
mBorder->setColor( Color::Transparent );
|
||||
mBorder->setLineWidth( PixelDensity::dpToPx( 1 ) );
|
||||
// mBorder->setLineWidth( PixelDensity::dpToPx( 1 ) );
|
||||
}
|
||||
|
||||
return mBorder;
|
||||
|
||||
@@ -99,6 +99,7 @@ bool UIRichText::applyProperty( const StyleSheetProperty& attribute ) {
|
||||
setFontColor( attribute.asColor() );
|
||||
break;
|
||||
case PropertyId::BackgroundColor:
|
||||
setBackgroundColor( attribute.asColor() );
|
||||
setFontBackgroundColor( attribute.asColor() );
|
||||
break;
|
||||
case PropertyId::TextShadowColor:
|
||||
|
||||
@@ -143,6 +143,7 @@ void UIWidgetCreator::createBaseWidgetList() {
|
||||
registeredWidget["mark"] = UITextSpan::NewMark;
|
||||
registeredWidget["div"] = UIRichText::New;
|
||||
registeredWidget["p"] = UIRichText::NewParagraph;
|
||||
registeredWidget["blockquote"] = [] { return UIRichText::NewWithTag( "blockquote" ); };
|
||||
registeredWidget["h1"] = UIRichText::NewH1;
|
||||
registeredWidget["h2"] = UIRichText::NewH2;
|
||||
registeredWidget["h3"] = UIRichText::NewH3;
|
||||
|
||||
@@ -25,7 +25,7 @@ This is a **bold** text and this is an *italic* text.
|
||||
1. Ordered 1
|
||||
2. Ordered 2
|
||||
|
||||
> This is a blockquote.
|
||||
> This is a blockquote.
|
||||
|
||||
`inline code`
|
||||
|
||||
@@ -36,7 +36,6 @@ void main() {
|
||||
printf("Hello World");
|
||||
}
|
||||
```
|
||||
|
||||
</MarkdownView>
|
||||
</ScrollView>
|
||||
</vbox>
|
||||
|
||||
Reference in New Issue
Block a user