Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-09-2014, 11:39 AM   #46
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,121
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@BR: you need to set extra spacing to add between rows to something negative in Preferences->Look & Feel to reduce row height in Qt 5.

@davidfor: Likely a result of some performance optimizations for column color/icon rules. I've pinged chaley about it, though this is not specific to Qt 5.

Last edited by kovidgoyal; 07-09-2014 at 11:52 AM.
kovidgoyal is offline   Reply With Quote
Old 07-09-2014, 12:30 PM   #47
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,630
Karma: 857074
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by davidfor View Post
Hmm, there is something wrong with column icons when running from source. With the beta it is OK.

I have a five icon rules. Each returns a different icon to be put in the same column. What looks like is happening is if the first rule returns the icon, five copies of it are put into the column. And if the first rule doesn't return the an icon, then no icons are displayed no matter what the others return.

This is happening whether simple or advanced rules are used. There are no errors being displayed anywhere.

I think the above is correct. I'll have a bit more of a play tomorrow to see if there is more to it.
A few days ago I made a change to icon templates to use compiled templates. It is possible that I broke things when I did that. To test, could you change gui2/library/models.py line 96/97 to be:
Code:
rule_icons = self.formatter.safe_format(fmt, self.mi, '', self.mi)
The change is to remove the two named parameters column_name and template_cache.

Let me know if this fixes it, because if it does I must remove the changes before Friday's release.
chaley is offline   Reply With Quote
 
Enthusiast
Old 07-09-2014, 01:01 PM   #48
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,717
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
FYI, I've been using calibre 1.43-64bit and 1.200-32bit on my Win8. That way I have both without a portable install. Just another way to do it.
JimmXinu is offline   Reply With Quote
Old 07-09-2014, 04:35 PM   #49
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,630
Karma: 857074
Join Date: Jan 2010
Location: France
Device: Many android devices
@davidfor: I found the problem (I hope). Because of the change I made, when using composed icons the first template was used for all subsequent templates. I have submitted a fix to Kovid.
chaley is offline   Reply With Quote
Old 07-09-2014, 06:21 PM   #50
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 3,613
Karma: 2183656
Join Date: Mar 2012
Location: NSW Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
@BR: you need to set extra spacing to add between rows to something negative in Preferences->Look & Feel to reduce row height in Qt 5.
@kovidgoyal - Max negative -5px gets me half way there (32 to 40) , any chance of upping the maximum -ve to -10px.

Aside : I don't the like 'flat' look much, in particular in a long list, large file, I find button on the vertical scroll bars harder to discern than the current 'rounded' look. I've noticed this on other 'flat' gui's (eg chrome browser) but I don't use the scroll bar button as much in those programs as I do in calibre book list and editor.

@chaley - I have some icons hooked to 'dummy' int fields where the rule is based on other columns
  • one is based the content of a custom comments column;
  • another is based on Formats (sad face if none);
  • I also have a fixed set of values column where the icon is varies according to value - nothing if not set, red spot if value1, yellow spot if value2, blue spot if value3 etc.

I'm not seeing any of those icons in V1.200 portable

Aside : Post 1.43 install I noticed the 'edges' of my icon columns had traces of the column values showing - I didn't report it because I wasn't certain it hadn't always been thus. But on Monday I had cause to look at the L&F->Set icons tab, and I noticed all my icons were set to show icon with text. I'm 'sure' they were all icon with no text. I can believe I might have inadvertently changed one of them, but less so that I would have changed all five. Anyway it was easily fixed - but seeing your response to davidfor I thought I'd mention it.

BR
BetterRed is offline   Reply With Quote
Old 07-09-2014, 10:21 PM   #51
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,121
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@BR: Sure. Increased the max to -15. The flat look comes from Qt 5's new Fusion theme, not much I can do about it, short of writing my own Qt 5 theme, which is rather too much work.
kovidgoyal is offline   Reply With Quote
Old 07-09-2014, 10:44 PM   #52
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,717
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
FYI, Generate Cover included:
Code:
from calibre.gui2 import NONE
# ... which trunk calibre/gui2/__init__.py defines as:
NONE = QVariant()  # : Null value to return from the data function of item models
NONE is used to return when font family isn't found or something like that. I'm not sure what it's doing with a cursory look.

Changing NONE to u'' works with qt5, but not with qt4, so I kept the gui2 import when using qt4. Without it, the font family drop list in GC isn't populated.
JimmXinu is offline   Reply With Quote
Old 07-09-2014, 10:54 PM   #53
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,121
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You should be able to return None instead of NONE in both PyQt4 and PyQt5
kovidgoyal is offline   Reply With Quote
Old 07-09-2014, 11:43 PM   #54
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 3,613
Karma: 2183656
Join Date: Mar 2012
Location: NSW Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
@BR: Sure. Increased the max to -15. The flat look comes from Qt 5's new Fusion theme, not much I can do about it, short of writing my own Qt 5 theme, which is rather too much work.
- Learnt to live with the fission bomb, so guess I'll soon get used to fusion theme

BR

"See, I told you we lived on a flat earth. And Mr Google and his friends all agree me," called Saint Bellarmino from his cloud to Galileo Galilei and Nicolaus Copernicus warming their toes by Lucifer's fires.
BetterRed is offline   Reply With Quote
Old 07-09-2014, 11:56 PM   #55
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 5,660
Karma: 5656630
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by chaley View Post
@davidfor: I found the problem (I hope). Because of the change I made, when using composed icons the first template was used for all subsequent templates. I have submitted a fix to Kovid.
I just tried it and it seems to be fixed.
davidfor is offline   Reply With Quote
Old 07-10-2014, 02:46 AM   #56
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,630
Karma: 857074
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by BetterRed View Post
Aside : Post 1.43 install I noticed the 'edges' of my icon columns had traces of the column values showing - I didn't report it because I wasn't certain it hadn't always been thus. But on Monday I had cause to look at the L&F->Set icons tab, and I noticed all my icons were set to show icon with text. I'm 'sure' they were all icon with no text. I can believe I might have inadvertently changed one of them, but less so that I would have changed all five. Anyway it was easily fixed - but seeing your response to davidfor I thought I'd mention it.

BR
All the changes I made are in the read side of the DB. The preferences are not rewritten. As such, it isn't this week's changes that could have caused it. Perhaps sometime in the past, but the latest opportunity would have been when the color chooser was added, which would be a candidate only if you are using advanced rules. I am going to put this one down as a gremlin, unless and until it happens to you again.
chaley is offline   Reply With Quote
Old 07-10-2014, 02:20 PM   #57
Terisa de morgan
Wizard
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 2,285
Karma: 1982066
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Mini, iPhone, iPad, Kobo Aura, Galaxy Tab3 8
Quote:
Originally Posted by kovidgoyal View Post
@BR: Sure. Increased the max to -15. The flat look comes from Qt 5's new Fusion theme, not much I can do about it, short of writing my own Qt 5 theme, which is rather too much work.
Thank you, too much space and yes, really flat but I'll get used to it
Terisa de morgan is online now   Reply With Quote
Old 07-10-2014, 10:57 PM   #58
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,717
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
Quote:
Originally Posted by kovidgoyal View Post
You should be able to return None instead of NONE in both PyQt4 and PyQt5
Yep, that works, thanks.

Unrelated issue:

Anybody know the correct replacement for self.setTextColor(Qt.darkGray) on a QTableWidgetItem descendent?

I've tryed setting the color on the current QBrush with self.foreground().setColor(Qt.darkGray), but it's not working.
JimmXinu is offline   Reply With Quote
Old 07-10-2014, 11:08 PM   #59
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,121
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
setForeground()
kovidgoyal is offline   Reply With Quote
Old 07-10-2014, 11:20 PM   #60
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,717
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
Quote:
Originally Posted by kovidgoyal View Post
setForeground()
Yep, that works. The C++ docs say that takes a QBrush, which I assumed was different than a color.

Thanks again.
JimmXinu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibre-plugins.com: A resource for plugin developers GRiker Development 0 05-01-2014 01:03 PM
Thank you to Calibre Developers Happy_Reader Calibre 1 12-17-2013 10:18 PM
Thanks Calibre Developers! TechniSol Kobo Reader 3 11-19-2012 08:34 PM
Calibre in a Python 3.2 world, attn: Kovid Kevin McAleavey Calibre 8 01-09-2012 05:49 PM
What device do most calibre developers use? barium Calibre 5 01-05-2011 07:23 AM


All times are GMT -4. The time now is 04:23 AM.


MobileRead.com is a privately owned, operated and funded community.