jacobaclarke / anki_addons

Addons I have made for anki
2 stars 0 forks source link

Help with simplified GUI #1

Closed NicolasCuri closed 5 years ago

NicolasCuri commented 5 years ago

Hey, is there any way I can hide both top and bottom buttons? I'm a long-time Anki user, and I'd appreciate hiding everything and being able to just use my keyboard shortcuts to access my options and answers. Can you show me a code line to substitute or anything? I'd appreciate that.

NicolasCuri commented 5 years ago

For example, this is the UI of the reviewer on Anki's iOS app: https://imgur.com/a/nugA7ev

Just the card layout... Can't get any simpler :)

jacobaclarke commented 5 years ago

This is a good point. I changed the code so that it will now show you the "show answer button" on just the first card that you do. On subsequent questions, it will be hidden. If you want to see normal GUI again. Press "i" to toggle it @NicolasCuri. Redownload the source code, and it should be fixed.

NicolasCuri commented 5 years ago

Awesome, brother! I just copied your new code, and I'm having trouble entering/exiting fullscreen mode with macOS High Sierra. Not sure what is causing this, but Anki is opening fullscreen with the menu bar open at all times. Also, it would be awesome if the bottom part of the reviewer wasn't black, because sometimes I don't use night mode and it is kind of awkward to have two different colors at the same time in my screen. Both of these screenshots are using Anki in fullscreen (one with night mode and the other one without it). If I hide both my tab bar and dock, the issue goes away, but I lose my desktop essentially. I'll be using your add-on anyway, this clean UI makes me a lil bit more focused. Thank you for doing this!

Screen Shot 2019-04-19 at 23 54 46 Screen Shot 2019-04-19 at 23 56 06

jacobaclarke commented 5 years ago

@NicolasCuri I don't have a mac, so these are my best guesses at what should work for you.

For the full-screen issues, remove the following code around line 40 from clean_ui.py: mw.setWindowFlags(Qt.Window | Qt.FramelessWindowHint);

To fix the bottom bar color, comment out the following code from user_bottom_buttons.css: #innertable { background-color: #2E2C2C; }

Also, nice to see a fellow sketchy user haha.

Edit: I just fixed the background colors in my last commit, so you will just need to change the full-screen issues.

NicolasCuri commented 5 years ago

Awesome! Thanks, man! So now whenever I feel like using Night Mode I need to manually change the background color back to #2E2C2C? Or is there any way to automatically change the background color (from Anki's regular grey to #2E2C2C when using dark mode?) I don't know how to code, but I think there's something that can be done with .night_mode .background-color maybe?

jacobaclarke commented 5 years ago

@NicolasCuri No worries. In css, / / is a comment. I'm not sure to how to do it automatically, you can change the code though to switch. To go back to night mode I actually change the colors of a couple things. You would need to change:

#innertable {
    /* background-color: #2E2C2C; */
}

font {
    /* color:white; */
    font-size: 10px;
}

.nobold {
    font-size: 9px;
    /* color: white; */
}

to this


#innertable {
    background-color: #2E2C2C;
}

font {
    color:white;
    font-size: 10px;
}

.nobold {
    font-size: 9px;
    color: white;
}