D15775: Make the item background color and page cache properties available from View component

2018-09-26 Thread Camilla Boemann
boemann added a comment.


  Ahh well in that case I don't mind and the words code looks clean enough - 
I'll let someone else review the components

REPOSITORY
  R8 Calligra

REVISION DETAIL
  https://phabricator.kde.org/D15775

To: dcaliste, leinir, danders, anthonyfieroni, #calligra:_3.0
Cc: boemann, Calligra-Devel-list, dcaliste, cochise, vandenoever


D15775: Make the item background color and page cache properties available from View component

2018-09-26 Thread Damien Caliste
dcaliste added a comment.


  Sorry, I was not clear in my description, I'm not setting the paper 
background color, but the item background color, i.e. the small area around and 
between the pages. In most desktop application it is light grey. But when using 
the KWCanvasItem in another context, it would be nice to be able to set this 
color. It's kind of desktop color if you prefer.

REPOSITORY
  R8 Calligra

REVISION DETAIL
  https://phabricator.kde.org/D15775

To: dcaliste, leinir, danders, anthonyfieroni, #calligra:_3.0
Cc: boemann, Calligra-Devel-list, dcaliste, cochise, vandenoever


D15775: Make the item background color and page cache properties available from View component

2018-09-26 Thread Camilla Boemann
boemann added a comment.


  'm sorry but the background should not be settable - it's a document property 
at best and in fact paper is mostly white,  so shouldn't even be settable

REPOSITORY
  R8 Calligra

REVISION DETAIL
  https://phabricator.kde.org/D15775

To: dcaliste, leinir, danders, anthonyfieroni, #calligra:_3.0
Cc: boemann, Calligra-Devel-list, dcaliste, cochise, vandenoever


D15775: Make the item background color and page cache properties available from View component

2018-09-26 Thread Damien Caliste
dcaliste created this revision.
dcaliste added reviewers: leinir, danders, anthonyfieroni, Calligra: 3.0.
dcaliste added a project: Calligra: 3.0.
Herald added a subscriber: Calligra-Devel-list.
dcaliste requested review of this revision.

REVISION SUMMARY
  Currently, the item background color and the page cache properties in Words 
are built-in values (_resp. _ set to QColor(232, 233, 234) and false). They 
cannot be changed from QML or at all (for the background color). Users of 
libCalligraComponents.so and friends must patch the sources to change their 
behaviours.
  
  This PR introduces a method to set the background color in KWCanvasItem. It 
also expands Components::View by overloading the fillColor property of 
QQuickPaintedItem and adds a pageCacheEnabled(bool) property.
  
  The two new properties are implemented for text documents and are irrelevant 
for the other kind of document (but may have some sense in the future, if 
needed).
  
  Is it the right way to go?

REPOSITORY
  R8 Calligra

REVISION DETAIL
  https://phabricator.kde.org/D15775

AFFECTED FILES
  components/Document.cpp
  components/Document.h
  components/View.cpp
  components/View.h
  components/impl/DocumentImpl.cpp
  components/impl/DocumentImpl.h
  components/impl/TextDocumentImpl.cpp
  components/impl/TextDocumentImpl.h
  words/part/KWCanvasBase.cpp
  words/part/KWCanvasBase.h
  words/part/KWCanvasItem.cpp
  words/part/KWCanvasItem.h

To: dcaliste, leinir, danders, anthonyfieroni, #calligra:_3.0
Cc: Calligra-Devel-list, dcaliste, cochise, vandenoever