Skip to content

Commit ee83ffb

Browse files
committed
Update build instructions, fix Gtk CSS theme
1 parent d0b4c07 commit ee83ffb

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

README.rst

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ Linux (Debian/Ubuntu/Mint)
5757

5858
On Debian/Ubuntu you can install all that is needed with::
5959

60-
sudo apt-get install cmake python3-dev g++ libpcre3 libpcre3-dev libgmp3-dev
61-
sudo apt-get install libgtkmm-3.0-dev libboost-all-dev libgmp-dev libsqlite3-dev uuid-dev
62-
sudo apt-get install texlive texlive-latex-extra dvipng
63-
sudo apt-get install python3-matplotlib python3-mpmath python3-pip python3-setuptools
60+
sudo apt install cmake python3-dev g++ libpcre3 libpcre3-dev libgmp3-dev \
61+
libgtkmm-3.0-dev libboost-all-dev libgmp-dev libsqlite3-dev uuid-dev \
62+
texlive texlive-latex-extra dvipng \
63+
python3-matplotlib python3-mpmath python3-pip python3-setuptools
6464
sudo pip3 install sympy
6565

6666
This is the development platform and issues are typically first fixed
@@ -93,7 +93,7 @@ or the clang++ compiler.
9393

9494
Install the dependencies with::
9595

96-
sudo dnf install python3-devel cmake gcc-c++ \
96+
sudo dnf install git python3-devel cmake gcc-c++ \
9797
pcre-devel gmp-devel libuuid-devel sqlite-devel \
9898
gtkmm30-devel boost-devel boost-python3-devel \
9999
texlive python3-matplotlib \
@@ -115,20 +115,19 @@ Building is then done with the standard::
115115
sudo make install
116116

117117
This will produce the command line app ``cadabra2`` and the Gtk
118-
notebook interface ``cadabra2-gtk``. You can also find the latter in
119-
the 'Education' menu.
118+
notebook interface ``cadabra2-gtk``. You can also find the latter
119+
when searching for the 'Cadabra' app from the 'Activities' menu.
120120

121121

122122
Linux (older Fedora/CentOS/Scientific Linux)
123123
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124124

125125
On Fedora/CentOS/Scientific Linux you can install the dependencies with::
126126

127-
sudo yum install epel-release
128-
sudo yum install python-devel cmake gcc-c++
129-
sudo yum install pcre-devel gmp-devel libuuid-devel sqlite-devel
130-
sudo yum install gtkmm30-devel boost-devel
131-
sudo yum install texlive python-matplotlib
127+
sudo yum install epel-release python-devel cmake gcc-c++ \
128+
pcre-devel gmp-devel libuuid-devel sqlite-devel \
129+
gtkmm30-devel boost-devel \
130+
texlive python-matplotlib
132131

133132
There is no Python 3 by default on this platform, so the instructions
134133
here will build Cadabra for use with Python 2. You also need to
@@ -169,12 +168,12 @@ Repositories/Add/Add by URL. Use the URL
169168

170169
After that, dependencies can be installed with::
171170

172-
sudo zypper install cmake python3-devel gcc-c++
173-
sudo zypper install pcre-devel gmp-devel libuuid-devel sqlite-devel
174-
sudo zypper install gtkmm3-devel
175-
sudo zypper install texlive python3-matplotlib
176-
sudo zypper install python3-pip
177-
sudo zypper install boost_1_61-devel libboost_python3-1_61_0
171+
sudo zypper install cmake python3-devel gcc-c++ \
172+
pcre-devel gmp-devel libuuid-devel sqlite-devel \
173+
gtkmm3-devel \
174+
texlive python3-matplotlib \
175+
python3-pip \
176+
boost_1_61-devel libboost_python3-1_61_0
178177
sudo pip3 install sympy
179178

180179
This platform receives less testing so please get in touch if you run

frontend/gtkmm/NotebookWindow.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ NotebookWindow::NotebookWindow(Cadabra *c, bool ro)
6767
// widget larger enough... So we still do that with set_margin_top(...).
6868
css_provider = Gtk::CssProvider::create();
6969
// padding-left: 20px; does not work on some versions of gtk, so we use margin in CodeInput
70-
Glib::ustring data = "GtkTextView { color: blue; }\n";
71-
data += "GtkTextView { background: white; -GtkWidget-cursor-aspect-ratio: 0.2; }\n";
70+
// We use CSS selectors for old-style and new-style (post 3.20) simultaneously.
71+
Glib::ustring data = "";
72+
data += "textview text { color: blue; background-color: white; -GtkWidget-cursor-aspect-ratio: 0.2; }\n";
73+
data += "GtkTextView { color: blue; background-color: white; -GtkWidget-cursor-aspect-ratio: 0.2; }\n";
7274
data += "*:focus { background-color: #eee; }\n";
7375
data += "*:selected { background-color: #ccc; }\n";
74-
data += "GtkTextView.error { background: transparent; -GtkWidget-cursor-aspect-ratio: 0.2; color: @theme_fg_color; }\n";
76+
data += "textview.error { background: transparent; -GtkWidget-cursor-aspect-ratio: 0.2; color: @theme_fg_color; }\n";
7577
data += "#ImageView { background-color: white; transition-property: padding, background-color; transition-duration: 1s; }\n";
7678
// data += "scrolledwindow { kinetic-scrolling: false; }\n";
7779

0 commit comments

Comments
 (0)