[gparted] Use CSS to turn off table borders once in saved details HTML



commit 63f578a94b778557d1999343359be5c8cfe57817
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Apr 7 16:24:27 2019 +0100

    Use CSS to turn off table borders once in saved details HTML

 src/Dialog_Progress.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index 59b921cb..982733e1 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -384,6 +384,7 @@ void Dialog_Progress::on_save()
                        << "<meta http-equiv='Content-Type' content='text/html;charset=utf-8' />" << std::endl
                        << "<title>" << _("GParted Details") << "</title>" << std::endl
                        << "<style type='text/css'>" << std::endl
+                       << "table {border:0}" << std::endl  // Disable borders for all tables
                        << "th {text-align:left}" << std::endl  // Left align all table headers
                        << ".number_col {text-align:right}" << std::endl  // Class for right alignment
                        << "</style>" << std::endl
@@ -419,7 +420,7 @@ void Dialog_Progress::on_save()
 
 void Dialog_Progress::write_device_details(const Device& device, std::ofstream& out)
 {
-       out << "<table border='0'>" << std::endl;
+       out << "<table>" << std::endl;
 
        // Device overview information
        out << "<tr><th>" << _("Device:") << "</th><td>" << device.get_path() << "</td></tr>" << std::endl;
@@ -442,7 +443,7 @@ void Dialog_Progress::write_device_details(const Device& device, std::ofstream&
        out << "<tr><td colspan='2'>&nbsp;</td></tr>" << std::endl;
        out << "</table>" << std::endl;
 
-       out << "<table border='0'>" << std::endl;
+       out << "<table>" << std::endl;
 
        // Partition headings
        out << "<tr>"
@@ -501,7 +502,7 @@ void Dialog_Progress::write_operation_details(const OperationDetail& operationde
                temp .replace( index, 1, "<br />" ) ;
        
        //and export everything to some kind of html...
-       out << "<table border='0'>" << std::endl
+       out << "<table>" << std::endl
        << "<tr>" << std::endl
        << "<td colspan='2'>" << std::endl
        << temp ;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]