https://bugs.kde.org/show_bug.cgi?id=421065

--- Comment #4 from avlas <jsar...@gmail.com> ---
(In reply to Nikita Sirgienko from comment #3)
> (In reply to avlas from comment #2)
> > (In reply to Nikita Sirgienko from comment #1)
> > > We have been considering improving the looks of Cantor worksheets, but 
> > > there
> > > are some limitation here: language (C++) and graphical widget stack (Qt).
> > > So, i think, flexibility of Jupyter/Kaggle (with possibility to change 
> > > view
> > > of, well, all existed elements via custom css).
> > > So, I don't think, that your request is fully possible. All of this
> > > castomizatio comes from flexibility of HTML+CSS, which used in Jupyter and
> > > Kaggle.
> > > 
> > > I am not sure (we still considering using qt web engine in Cantor), but I
> > > think, that CSS Markdown styles don't possible in Cantor on this moment-
> > > this will work only with fully featured web browser.
> > > 
> > > Converting worksheet to Markdown is theoretical possible feature, but this
> > > is a lot of work and I haven't seen a huge request for this feature, so I
> > > don't think, that we will implement this soon.
> > > 
> > > On this moment, we more focused on improving user expirience, with
> > > supporting a good look of program.
> > 
> > I see. Many thanks for the explanation. QtWebEngine seems like a drastic
> > move with pros (the flexibility you talked about) but also some significant
> > cons (security, privacy, "weight" and the effort involved in the 
> > transition).
> > 
> > Why not just using nodejs instead? Would this help with the cons?
> > 
> > Alternatively, I wonder if adding an interface in QML could help making it
> > more appealing. Perhaps that is what is needed and people from the design
> > team can help.
> > 
> > Regarding Markdown, I guess you could take a look at projects such as
> > Typora. I think it uses nodejs to allow on-the-fly styling based on CSS
> > files.
> 
> Nodejs no help in this situation at all, because the main limitation is that
> Cantor, without web engine, can't fully render (I mean, from text form to
> content, visible for user) HTML+CSS. You have been mentioned Typora, but key
> component of supporting css styles is that Typora application is actually a
> browser (chromium, to be more precisious, - Typora is based on Electron
> framework). And because of fully support of HTML+CSS - Typora can have css
> style for Markdown, and how it manage the styles - via javascript, or
> something else - is not very important in this situation.
> Also, I haven't been mistackend, QML can do only what Qt can do because it
> is just an another form of UI representation: one form is ordinary (for Qt
> apps) ui files (and ui files is just a XML) and another form is a more css
> styled QML markup.

I see, I didn't know Typora was an Electron app.

I'll make just one last comment for the case it might be somehow useful in this
context. There are ways to change the look of Qt apps by passing qss files.

The following are two tiny examples of this for Kmail and Konsole:

- Kmail (some people use this to make the html status bar "dissapear"):

```
 MessageViewer--HtmlStatusBar {
    max-width: 0px;
}
```

- Konsole (I use this to have a minimalistic separator between internally tiled
terminals):

```
Konsole--TerminalHeaderBar {
  max-width: 0;
  max-height: 0;
}
Konsole--ViewSplitter {
  background-color: #555;
}
```

I wonder if styling in Cantor could benefit of this in things like spacing
(margins, paddings
) of components, colors (background color of worksheet, background and
foreground color of cells), line style of the cell (I'd personally preferred
solid instead of dashed, its width, its color...), the color of ">>>",  etc.
You see what I mean.

For instance, similarly to Autorun commands, Cantor's settings could include a
text box where to specify these things. These could be saved to a file by
Cantor, which Cantor would use at startup to style itself. Then, Cantor could
set as example its current style in that text box (so its style wouldn't
change) for users to better know how to adjust these things to their like if
wanted.

I think it could be great because this would allow the community to in fact
create Cantor themes written using css syntax. This could even be supported by
"Get Hot New Stuff" infrastructure, saving a list of these themes (alternative
configurations), and the active theme could be edited internally within the
text box.

This is just an idea that perhaps could be easier to implement and still be
useful.

One last suggestion with respect to styling (this one I think it would not be
able to change with qss entries, at least not entirely): I'd really like to
modify how line numbers and ">>>" is displayed, e.g. "0>>>". I'd like to be
able to set the initial counter (e.g., 1 instead of 0, if wanted, or even make
it backend dependent; also have the option to put the number within
brackets/parentheses...). Similarly for ">>>", I'd like to be able to use ">>",
or ">", or any other symbols I may like (again, perhaps being able to change
this dependening on backend).

Also, it seems like they are part of the same qt (label?) component. If qss
styling would be promoted, it would be a good idea to separate "0" from ">>>"
to be able to manage margins/padding between the two from qss entries.

These are a couple of ideas, I hope you can find them somewhat useful.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to